use of com.uber.cadence.serviceclient.IWorkflowService in project cadence-client by uber-java.
the class RegisterTestDomain method main.
public static void main(String[] args) throws InterruptedException {
if (!useDockerService) {
return;
}
IWorkflowService service = new WorkflowServiceTChannel(ClientOptions.defaultInstance());
RegisterDomainRequest request = new RegisterDomainRequest().setName(DOMAIN).setWorkflowExecutionRetentionPeriodInDays(1);
while (true) {
try {
service.RegisterDomain(request);
break;
} catch (DomainAlreadyExistsError e) {
break;
} catch (TException e) {
String message = e.getMessage();
if (message != null && !message.contains("Failed to connect to the host") && !message.contains("Connection timeout on identification")) {
e.printStackTrace();
}
Thread.sleep(500);
continue;
} catch (Throwable e) {
e.printStackTrace();
System.exit(1);
}
}
System.exit(0);
}
Aggregations