Skip to content

Commit

Permalink
Add PipelineJobItemManager
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Nov 18, 2023
1 parent 3ba58fe commit d15158f
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public final class PipelineJobManager {

private final PipelineJobAPI jobAPI;

private final PipelineJobItemManager<? extends PipelineJobItemProgress> jobItemManager = new PipelineJobItemManager<>(jobAPI.getYamlJobItemProgressSwapper());

/**
* Get job configuration.
*
Expand Down Expand Up @@ -93,7 +91,7 @@ public Optional<String> start(final PipelineJobConfiguration jobConfig) {
*/
public void startDisabledJob(final String jobId) {
if (jobAPI.isIgnoreToStartDisabledJobWhenJobItemProgressIsFinished()) {
Optional<? extends PipelineJobItemProgress> jobItemProgress = jobItemManager.getProgress(jobId, 0);
Optional<? extends PipelineJobItemProgress> jobItemProgress = new PipelineJobItemManager<>(jobAPI.getYamlJobItemProgressSwapper()).getProgress(jobId, 0);
if (jobItemProgress.isPresent() && JobStatus.FINISHED == jobItemProgress.get().getStatus()) {
log.info("job status is FINISHED, ignore, jobId={}", jobId);
return;
Expand Down

0 comments on commit d15158f

Please sign in to comment.