Skip to content

Commit

Permalink
Merge pull request #1244 from CalebSLane/develop
Browse files Browse the repository at this point in the history
remove astm bridge container as part of setup script teardown
  • Loading branch information
CalebSLane authored Aug 22, 2024
2 parents cd8e11a + cf870fe commit 24c4ac5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 6 additions & 0 deletions install/installerTemplate/linux/setup_OpenELIS.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
DOCKER_FHIR_API_CONTAINER_NAME = "external-fhir-api"
DOCKER_NGINX_CONTAINER_NAME = "openelisglobal-proxy"
DOCKER_FRONTEND_CONTAINER_NAME = "openelisglobal-frontend"
DOCKER_ASTM_BRIDGE_CONTAINER_NAME = "astm-http-bridge"
DOCKER_AUTOHEAL_CONTAINER_NAME = "autoheal-oe"
DOCKER_DB_CONTAINER_NAME = "openelisglobal-database"
DOCKER_DB_BACKUPS_DIR = "/backups/" # path in docker container
Expand Down Expand Up @@ -871,6 +872,11 @@ def uninstall_docker_images():
cmd = 'docker rm $(docker stop $(docker ps -a -q --filter="name=' + DOCKER_FRONTEND_CONTAINER_NAME + '" --format="{{.ID}}"))'
os.system(cmd)

if ASTM_PROXY:
log("removing astm-bridge image...", PRINT_TO_CONSOLE)
cmd = 'docker rm $(docker stop $(docker ps -a -q --filter="name=' + DOCKER_ASTM_BRIDGE_CONTAINER_NAME + '" --format="{{.ID}}"))'
os.system(cmd)

log("removing autoheal image...", PRINT_TO_CONSOLE)
cmd = 'docker rm $(docker stop $(docker ps -a -q --filter="name=' + DOCKER_AUTOHEAL_CONTAINER_NAME + '" --format="{{.ID}}"))'
os.system(cmd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public class FhirUtil implements FhirClientFetcher {
@Override
public IGenericClient getFhirClient(String fhirStorePath) {
IGenericClient fhirClient = fhirContext.newRestfulGenericClient(fhirStorePath);
if (!GenericValidator.isBlankOrNull(fhirConfig.getUsername())
&& !fhirConfig.getLocalFhirStorePath().equals(fhirStorePath)) {
if (!GenericValidator.isBlankOrNull(fhirConfig.getUsername())) {
IClientInterceptor authInterceptor = new BasicAuthInterceptor(fhirConfig.getUsername(),
fhirConfig.getPassword());
fhirClient.registerInterceptor(authInterceptor);
Expand All @@ -45,6 +44,11 @@ public IGenericClient getFhirClient(String fhirStorePath) {

public IGenericClient getLocalFhirClient() {
IGenericClient fhirClient = fhirContext.newRestfulGenericClient(fhirConfig.getLocalFhirStorePath());
if (!GenericValidator.isBlankOrNull(fhirConfig.getUsername())) {
IClientInterceptor authInterceptor = new BasicAuthInterceptor(fhirConfig.getUsername(),
fhirConfig.getPassword());
fhirClient.registerInterceptor(authInterceptor);
}
return fhirClient;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ public class FhirApiWorkFlowServiceImpl implements FhirApiWorkflowService {
@Value("${org.openelisglobal.remote.source.updateStatus}")
private Optional<Boolean> remoteStoreUpdateStatus;

@Scheduled(initialDelay = 10 * 1000, fixedRate = 2 * 60 * 1000)
@Value("${org.openelisglobal.remote.source.identifier:}#{T(java.util.Collections).emptyList()}")
private List<String> remoteStoreIdentifier;

@Override
@Scheduled(initialDelay = 10 * 1000, fixedRateString = "${org.openelisglobal.remote.poll.frequency:120000}")
public void pollForRemoteTasks() {
processWorkflow(ResourceType.Task);
}
Expand Down Expand Up @@ -472,7 +475,7 @@ private void processTaskImportOrder(Task remoteTask, String remoteStorePath, IGe
remoteTask.setStatus(taskStatus);
sourceFhirClient.update().resource(remoteTask).execute();
}
IGenericClient localFhirClient = fhirContext.newRestfulGenericClient(localFhirStorePath);
IGenericClient localFhirClient = fhirUtil.getFhirClient(localFhirStorePath);
localFhirClient.update().resource(localObjects.task).execute();
// taskBasedOnRemoteTask.setStatus(taskStatus);
// localFhirClient.update().resource(taskBasedOnRemoteTask).execute();
Expand Down

0 comments on commit 24c4ac5

Please sign in to comment.