Code review comments

This commit is contained in:
Tadgh 2020-06-10 10:46:28 -07:00
parent 6e43c5348c
commit d698ad7180
1 changed files with 7 additions and 6 deletions

View File

@ -68,14 +68,15 @@ public class BulkExportDaoSvc {
public void setJobToStatus(String theJobUUID, BulkJobStatusEnum theStatus) {
Optional<BulkExportJobEntity> oJob = myBulkExportJobDao.findByJobId(theJobUUID);
if (!oJob.isPresent()) {
ourLog.error("Job doesn't exist!");
} else {
ourLog.info("Setting job with UUID {} to {}", theJobUUID, theStatus);
BulkExportJobEntity bulkExportJobEntity = oJob.get();
bulkExportJobEntity.setStatus(theStatus);
myBulkExportJobDao.save(bulkExportJobEntity);
ourLog.error("Job with UUID {} doesn't exist!", theJobUUID);
return;
}
ourLog.info("Setting job with UUID {} to {}", theJobUUID, theStatus);
BulkExportJobEntity bulkExportJobEntity = oJob.get();
bulkExportJobEntity.setStatus(theStatus);
myBulkExportJobDao.save(bulkExportJobEntity);
}
}