Skip to content

Commit

Permalink
target id to id
Browse files Browse the repository at this point in the history
  • Loading branch information
MDeLuise authored and Coduz committed Jan 30, 2023
1 parent ed6e7ec commit f660b12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ public final Object processItem(Object item) throws Exception {
jobLogger.setClassLog(LOG);

JobTarget jobTarget = wrappedJobTarget.getJobTarget();
jobLogger.info("Processing target: {} (target id: {})", getTargetDisplayName(jobTarget), jobTarget.getId().toCompactId());
jobLogger.info("Processing target: {} (id: {})", getTargetDisplayName(jobTarget), jobTarget.getId().toCompactId());
try {
processTarget(jobTarget);

jobTarget.setStatus(getCompletedStatus(jobTarget));

jobLogger.info("Processing target: {} (target id: {}) - DONE!", getTargetDisplayName(jobTarget), jobTarget.getId().toCompactId());
jobLogger.info("Processing target: {} (id: {}) - DONE!", getTargetDisplayName(jobTarget), jobTarget.getId().toCompactId());
} catch (Exception e) {
jobLogger.error(e, "Processing target: {} (target id: {}) - Error!", getTargetDisplayName(jobTarget), jobTarget.getId().toCompactId());
jobLogger.error(e, "Processing target: {} (id: {}) - Error!", getTargetDisplayName(jobTarget), jobTarget.getId().toCompactId());

jobTarget.setStatus(getFailedStatus(jobTarget));
wrappedJobTarget.setProcessingException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ public Object readItem() throws Exception {
JobTargetListResult jobTargets = KapuaSecurityUtils.doPrivileged(() -> jobTargetService.query(query));


jobLogger.info("Reading target: {} (target id: {})...", getTargetDisplayName(jobTargets.getItem(0)), jobTargets.getItem(0).getId().toCompactId());
jobLogger.info("Reading target: {} (id: {})...", getTargetDisplayName(jobTargets.getItem(0)), jobTargets.getItem(0).getId().toCompactId());

JobTargetWrapper currentWrappedJobTarget = null;
if (jobTargetIndex < wrappedJobTargets.size()) {
currentWrappedJobTarget = wrappedJobTargets.get(jobTargetIndex++);
}

jobLogger.info("Reading target: {} (target id: {})... DONE!", getTargetDisplayName(jobTargets.getItem(0)), jobTargets.getItem(0).getId().toCompactId());
jobLogger.info("Reading target: {} (id: {})... DONE!", getTargetDisplayName(jobTargets.getItem(0)), jobTargets.getItem(0).getId().toCompactId());
return currentWrappedJobTarget;
}

Expand Down

0 comments on commit f660b12

Please sign in to comment.