Skip to content

Commit

Permalink
fix(mod-search): fix export of cql files
Browse files Browse the repository at this point in the history
- add new code

Closes: MSEARCH-762
  • Loading branch information
viacheslavpoliakov committed Jun 7, 2024
1 parent 7317d08 commit b5e3c63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public ResourceIdsJob createStreamJob(ResourceIdsJob job, String tenantId) {
boolean isNotShared = !tenantId.equalsIgnoreCase("consortium")
&& entity.getQuery().contains("shared==\"false\"");
var savedJob = isNotShared
? saveAndRun(entity, tenantId)
? consortiumTenantExecutor.executeSimple(() -> saveAndRun(entity, tenantId), tenantId)
: consortiumTenantExecutor.execute(() -> saveAndRun(entity, tenantId));
log.info("[SLY] *** SIMPLE: {}, savedJob: {}", isNotShared, savedJob.toString());
log.info("[SLY] *** SIMPLE EXECUTED: {}, savedJob: {}", isNotShared, savedJob.toString());

return resourceIdsJobMapper.convert(savedJob);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public <T> T execute(String originalTenantId, Supplier<T> operation) {
}
}

public <T> T executeSimple(Supplier<T> operation, String tenantId) {
log.info("[SLY] *** No changing context {}", tenantId);
return operation.get();
}

public void run(Runnable operation) {
execute(() -> {
operation.run();
Expand Down

0 comments on commit b5e3c63

Please sign in to comment.