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

remove astm bridge container as part of setup script teardown #1244

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading