fixing bug

This commit is contained in:
leif stawnyczy 2024-03-26 09:16:11 -04:00
parent 4be7fa742f
commit e1474c8cd5
2 changed files with 13 additions and 1 deletions

View File

@ -440,7 +440,7 @@ public class JpaJobPersistenceImpl implements IJobPersistence {
Page<Batch2WorkChunkMetadataView> page = myWorkChunkMetadataViewRepo.findAll(
Pageable.ofSize(thePageSize).withPage(thePageIndex));
for (Batch2WorkChunkMetadataView metadataView : page.getContent()) {
theConsumer.accept((WorkChunk) metadataView.toChunkMetadata());
theConsumer.accept(metadataView.toChunkMetadata().toWorkChunk());
}
}
});

View File

@ -94,4 +94,16 @@ public class WorkChunkMetadata implements IModelJson {
public void setSequence(int theSequence) {
mySequence = theSequence;
}
public WorkChunk toWorkChunk() {
WorkChunk workChunk = new WorkChunk();
workChunk.setId(getId());
workChunk.setStatus(getStatus());
workChunk.setInstanceId(getInstanceId());
workChunk.setJobDefinitionId(getJobDefinitionId());
workChunk.setJobDefinitionVersion(getJobDefinitionVersion());
workChunk.setSequence(getSequence());
workChunk.setTargetStepId(getTargetStepId());
return workChunk;
}
}