Fix inaccuracy

This commit is contained in:
Mikhail Trofimov 2026-07-09 17:00:41 +03:00
parent 77f217e0f8
commit 55700d46aa
2 changed files with 4 additions and 4 deletions

View file

@ -41,7 +41,7 @@ public class ExecutorsConfig {
@Bean("lpSaverExecutorService") @Bean("lpSaverExecutorService")
public ExecutorService lpSaverExecutorService(CreditTrackerSettings creditTrackerSettings) { public ExecutorService lpSaverExecutorService(CreditTrackerSettings creditTrackerSettings) {
return Executors.newFixedThreadPool(creditTrackerSettings.getNpPipeline().parallelRequests(), r -> { return Executors.newFixedThreadPool(creditTrackerSettings.getLpPipeline().parallelRequests(), r -> {
Thread t = new Thread(r); Thread t = new Thread(r);
t.setName("lp-subject-saver-%d".formatted(t.threadId())); t.setName("lp-subject-saver-%d".formatted(t.threadId()));
return t; return t;

View file

@ -81,7 +81,7 @@ public class StartupRestoreService {
} catch (Exception e) { } catch (Exception e) {
log.error("Error build default np pipeline for packageId {}: {}", userPackage.getId(), ExceptionUtils.getStackTrace(e)); log.error("Error build default np pipeline for packageId {}: {}", userPackage.getId(), ExceptionUtils.getStackTrace(e));
} }
} else { } else if (userPackage.getSubjectType() == 2) {
try { try {
Long count = legalsFidMapMapper.deleteByPackageId(userPackage.getId()); Long count = legalsFidMapMapper.deleteByPackageId(userPackage.getId());
log.trace("Deleted {} lp rows", count); log.trace("Deleted {} lp rows", count);
@ -89,7 +89,7 @@ public class StartupRestoreService {
log.debug("Try to read and build lp pipeline for packageId {}; req xml path: {}", userPackage.getId(), xmlReqPath); log.debug("Try to read and build lp pipeline for packageId {}; req xml path: {}", userPackage.getId(), xmlReqPath);
Pipeline pipeline = lpPipelinePackageManager.build(new SetupParam(userPackage.getId(), 2, PipelineMode.DEFAULT)); Pipeline pipeline = lpPipelinePackageManager.build(new SetupParam(userPackage.getId(), 2, PipelineMode.DEFAULT));
lpPipelineOrchestrator.startOrDelay( lpPipelineOrchestrator.startOrDelay(
() -> saver.readAndSaveNpPackage(userPackage.getId(), xmlReqPath), () -> saver.readAndSaveLpPackage(userPackage.getId(), xmlReqPath),
pipeline, userPackage.getId() pipeline, userPackage.getId()
); );
} catch (Exception e) { } catch (Exception e) {
@ -111,7 +111,7 @@ public class StartupRestoreService {
} catch (Exception e) { } catch (Exception e) {
log.error("Error build restore np pipeline for packageId {}: {}", userPackage.getId(), ExceptionUtils.getStackTrace(e)); log.error("Error build restore np pipeline for packageId {}: {}", userPackage.getId(), ExceptionUtils.getStackTrace(e));
} }
} else { } else if (userPackage.getSubjectType() == 2) {
try { try {
log.debug("Build lp pipeline for packageId {}", userPackage.getId()); log.debug("Build lp pipeline for packageId {}", userPackage.getId());
Pipeline pipeline = lpPipelinePackageManager.build(new SetupParam(userPackage.getId(), 2, PipelineMode.DEFAULT)); Pipeline pipeline = lpPipelinePackageManager.build(new SetupParam(userPackage.getId(), 2, PipelineMode.DEFAULT));