Yair Zaslavsky has posted comments on this change.

Change subject: engine: Update gluster task's info only if job in progress
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.ovirt.org/#/c/24151/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterAsyncTaskStatusQueryBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterAsyncTaskStatusQueryBase.java:

Line 115:             taskParameters.setVolumeName(volume.getName());
Line 116:             asyncTask.setTaskParameters(taskParameters);
Line 117: 
Line 118:             List<Step> stepsList = 
getStepDao().getStepsByExternalId(asyncTask.getTaskId());
Line 119:             if (stepsList != null && !stepsList.isEmpty() && 
stepsList.get(0).getEndTime() != null) {
if you want to check if the job has ended, why not use the job entity?
it has endTime.
Line 120:                 // if job has already ended, do not update status.
Line 121:                 
asyncTask.setStatus(status.getStatusSummary().getStatus());
Line 122:                 
asyncTask.setMessage(GlusterTaskUtils.getInstance().getSummaryMessage(status.getStatusSummary()));
Line 123:                 
getGlusterTaskUtils().updateSteps(getClusterDao().get(clusterId), asyncTask, 
stepsList);


Line 116:             asyncTask.setTaskParameters(taskParameters);
Line 117: 
Line 118:             List<Step> stepsList = 
getStepDao().getStepsByExternalId(asyncTask.getTaskId());
Line 119:             if (stepsList != null && !stepsList.isEmpty() && 
stepsList.get(0).getEndTime() != null) {
Line 120:                 // if job has already ended, do not update status.
the comment here is unclear to me, i see that the status is updated.
Line 121:                 
asyncTask.setStatus(status.getStatusSummary().getStatus());
Line 122:                 
asyncTask.setMessage(GlusterTaskUtils.getInstance().getSummaryMessage(status.getStatusSummary()));
Line 123:                 
getGlusterTaskUtils().updateSteps(getClusterDao().get(clusterId), asyncTask, 
stepsList);
Line 124:             }


-- 
To view, visit http://gerrit.ovirt.org/24151
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e431da7797911372f8b6e474a4ab74c6626366d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Ramesh N <rnach...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to