Merge branch '5745-ready-state-batch2' into 5767-add-poll-waiting-step
This commit is contained in:
commit
ad44f37e55
|
@ -92,8 +92,7 @@ public interface IInstanceStateTransitions extends IWorkChunkCommon, WorkChunkTe
|
|||
instanceId1,
|
||||
new JobChunkProgressAccumulator(),
|
||||
null,
|
||||
jobDefinitionRegistry,
|
||||
getTransactionManager()
|
||||
jobDefinitionRegistry
|
||||
).process();
|
||||
});
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -112,16 +112,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;
|
||||
|
@ -131,8 +128,6 @@ public class JobInstanceProcessor {
|
|||
myJobInstanceProgressCalculator =
|
||||
new JobInstanceProgressCalculator(theJobPersistence, theProgressAccumulator, theJobDefinitionRegistry);
|
||||
myJobInstanceStatusUpdater = new JobInstanceStatusUpdater(theJobDefinitionRegistry);
|
||||
|
||||
myTransactionManager = theTransactionManager;
|
||||
}
|
||||
|
||||
public void process() {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -114,8 +114,7 @@ public class JobMaintenanceServiceImplTest extends BaseBatch2Test {
|
|||
myJobDefinitionRegistry,
|
||||
batchJobSender,
|
||||
myJobExecutorSvc,
|
||||
myReductionStepExecutorService,
|
||||
myTransactionService
|
||||
myReductionStepExecutorService
|
||||
);
|
||||
myStorageSettings.setJobFastTrackingEnabled(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue