This commit is contained in:
parent
405028d078
commit
a90d76d209
2 changed files with 22 additions and 16 deletions
|
|
@ -49,6 +49,7 @@ public class UpdatingFidAndPdService {
|
|||
Pipeline pipeline = pipelinePackageManager.buildRecalculationPD(new SetupParam(null, null, PipelineMode.RECALC_PERSONAL_DATA));
|
||||
CompletableFuture<?> future = pipelineRecalcPDOrchestrator.startOrReject(pipeline);
|
||||
future.whenComplete((o, throwable) -> {
|
||||
try {
|
||||
if (throwable != null) {
|
||||
log.error(throwable.getMessage(), throwable);
|
||||
return;
|
||||
|
|
@ -65,7 +66,11 @@ public class UpdatingFidAndPdService {
|
|||
log.error("Failed to build pipeline", e);
|
||||
}
|
||||
});
|
||||
|
||||
} finally {
|
||||
log.info("pipeline finished");
|
||||
pipeline.close();
|
||||
pipelineRecalcPDOrchestrator.release();
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to build pipeline", e);
|
||||
|
|
|
|||
|
|
@ -54,10 +54,11 @@ public class PipelineRecalcPDOrchestrator {
|
|||
.orTimeout(creditTrackerSettings.getPipeline().globalTimeout().toMillis(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
private void release() {
|
||||
public void release() {
|
||||
log.debug("checking for delayed pipelines...");
|
||||
synchronized (lock) {
|
||||
semaphore.release();
|
||||
log.info("semaphore amount: {}", semaphore.availablePermits());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue