From b399a7a619f842cc3cad317cf67ca99d7918c3a1 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Fri, 22 Mar 2024 14:48:43 -0400 Subject: [PATCH] commit changes --- .../hapi/fhir/batch2/test/IInstanceStateTransitions.java | 3 +-- .../java/ca/uhn/fhir/batch2/config/BaseBatch2Config.java | 6 ++---- .../uhn/fhir/batch2/maintenance/JobInstanceProcessor.java | 7 +------ .../batch2/maintenance/JobMaintenanceServiceImpl.java | 8 ++------ .../batch2/maintenance/JobMaintenanceServiceImplTest.java | 3 +-- 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/hapi-fhir-storage-batch2-test-utilities/src/main/java/ca/uhn/hapi/fhir/batch2/test/IInstanceStateTransitions.java b/hapi-fhir-storage-batch2-test-utilities/src/main/java/ca/uhn/hapi/fhir/batch2/test/IInstanceStateTransitions.java index ba0aaffbf8d..95ce1e060e4 100644 --- a/hapi-fhir-storage-batch2-test-utilities/src/main/java/ca/uhn/hapi/fhir/batch2/test/IInstanceStateTransitions.java +++ b/hapi-fhir-storage-batch2-test-utilities/src/main/java/ca/uhn/hapi/fhir/batch2/test/IInstanceStateTransitions.java @@ -92,8 +92,7 @@ public interface IInstanceStateTransitions extends IWorkChunkCommon, WorkChunkTe instanceId1, new JobChunkProgressAccumulator(), null, - jobDefinitionRegistry, - getTransactionManager() + jobDefinitionRegistry ).process(); }); diff --git a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/config/BaseBatch2Config.java b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/config/BaseBatch2Config.java index 595e22d3d8b..2686bd5a44e 100644 --- a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/config/BaseBatch2Config.java +++ b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/config/BaseBatch2Config.java @@ -104,8 +104,7 @@ public abstract class BaseBatch2Config { JpaStorageSettings theStorageSettings, BatchJobSender theBatchJobSender, WorkChunkProcessor theExecutor, - IReductionStepExecutorService theReductionStepExecutorService, - PlatformTransactionManager theTransactionManager) { + IReductionStepExecutorService theReductionStepExecutorService) { return new JobMaintenanceServiceImpl( theSchedulerService, myPersistence, @@ -113,8 +112,7 @@ public abstract class BaseBatch2Config { theJobDefinitionRegistry, theBatchJobSender, theExecutor, - theReductionStepExecutorService, - theTransactionManager); + theReductionStepExecutorService); } @Bean diff --git a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobInstanceProcessor.java b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobInstanceProcessor.java index 84fb10bff8e..64f3e1e05e6 100644 --- a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobInstanceProcessor.java +++ b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobInstanceProcessor.java @@ -111,16 +111,13 @@ public class JobInstanceProcessor { private final String myInstanceId; private final JobDefinitionRegistry myJobDefinitionegistry; - private final PlatformTransactionManager myTransactionManager; - public JobInstanceProcessor( IJobPersistence theJobPersistence, BatchJobSender theBatchJobSender, String theInstanceId, JobChunkProgressAccumulator theProgressAccumulator, IReductionStepExecutorService theReductionStepExecutorService, - JobDefinitionRegistry theJobDefinitionRegistry, - PlatformTransactionManager theTransactionManager) { + JobDefinitionRegistry theJobDefinitionRegistry) { myJobPersistence = theJobPersistence; myBatchJobSender = theBatchJobSender; myInstanceId = theInstanceId; @@ -130,8 +127,6 @@ public class JobInstanceProcessor { myJobInstanceProgressCalculator = new JobInstanceProgressCalculator(theJobPersistence, theProgressAccumulator, theJobDefinitionRegistry); myJobInstanceStatusUpdater = new JobInstanceStatusUpdater(theJobDefinitionRegistry); - - myTransactionManager = theTransactionManager; } public void process() { diff --git a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImpl.java b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImpl.java index ae8510014ea..39c1caa7d03 100644 --- a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImpl.java +++ b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImpl.java @@ -90,7 +90,6 @@ public class JobMaintenanceServiceImpl implements IJobMaintenanceService, IHasSc private final JobDefinitionRegistry myJobDefinitionRegistry; private final BatchJobSender myBatchJobSender; private final WorkChunkProcessor myJobExecutorSvc; - private final PlatformTransactionManager myTransactionManager; private final Semaphore myRunMaintenanceSemaphore = new Semaphore(1); @@ -111,8 +110,7 @@ public class JobMaintenanceServiceImpl implements IJobMaintenanceService, IHasSc @Nonnull JobDefinitionRegistry theJobDefinitionRegistry, @Nonnull BatchJobSender theBatchJobSender, @Nonnull WorkChunkProcessor theExecutor, - @Nonnull IReductionStepExecutorService theReductionStepExecutorService, - PlatformTransactionManager theTransactionService) { + @Nonnull IReductionStepExecutorService theReductionStepExecutorService) { myStorageSettings = theStorageSettings; myReductionStepExecutorService = theReductionStepExecutorService; Validate.notNull(theSchedulerService); @@ -125,7 +123,6 @@ public class JobMaintenanceServiceImpl implements IJobMaintenanceService, IHasSc myJobDefinitionRegistry = theJobDefinitionRegistry; myBatchJobSender = theBatchJobSender; myJobExecutorSvc = theExecutor; - myTransactionManager = theTransactionService; } @Override @@ -247,8 +244,7 @@ public class JobMaintenanceServiceImpl implements IJobMaintenanceService, IHasSc instanceId, progressAccumulator, myReductionStepExecutorService, - myJobDefinitionRegistry, - myTransactionManager); + myJobDefinitionRegistry); ourLog.debug( "Triggering maintenance process for instance {} in status {}", instanceId, diff --git a/hapi-fhir-storage-batch2/src/test/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImplTest.java b/hapi-fhir-storage-batch2/src/test/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImplTest.java index fedc33cc0dc..76645ce431d 100644 --- a/hapi-fhir-storage-batch2/src/test/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImplTest.java +++ b/hapi-fhir-storage-batch2/src/test/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImplTest.java @@ -114,8 +114,7 @@ public class JobMaintenanceServiceImplTest extends BaseBatch2Test { myJobDefinitionRegistry, batchJobSender, myJobExecutorSvc, - myReductionStepExecutorService, - myTransactionService + myReductionStepExecutorService ); myStorageSettings.setJobFastTrackingEnabled(true); }