Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDP-5671 added script to allow bulk cancellation of orders in GBF #126

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

zyme
Copy link
Collaborator

@zyme zyme commented Mar 8, 2021

From time to time, we need to cancel orders with GBF in an adhoc manner. Rather than fiddling with tests and running the risk of uncommenting @Ignore, I thought a CLI would be nice, so I write this.

@@ -0,0 +1,13 @@
package org.broadinstitute.dsm.model.gbf;

import com.google.gson.annotations.SerializedName;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few model classes to match the GBF APIs

@@ -96,15 +97,17 @@

private static Executor blindTrustEverythingExecutor;

public GBFRequestUtil() {
static {
initTrust();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this change, even if you were calling a static method, you would have had to new up an object, lest you would see an NPE because various static methods assume that blindTrustEverythingExecutor has been initialized. Now it gets initialized automagically.

logger.error("Starting up the blindTrustEverythingExecutor ", e);
System.exit(-3);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit scary--a constructor that calls System.exit() can bring down the entire app!

@zyme zyme changed the base branch from appengine to develop March 8, 2021 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant