Skip to content

Commit 9ec7ccf

Browse files
committed
fix (JobLoggingDB): correctly order the logging info to pick the lastest entry for a given status
1 parent 6cd3254 commit 9ec7ccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DIRAC/WorkloadManagementSystem/DB/JobLoggingDB.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def getWMSTimeStamps(self, jobID):
141141
# self.log.debug('getWMSTimeStamps: Retrieving Timestamps for Job %d' % int(jobID))
142142

143143
result = {}
144-
cmd = "SELECT Status,StatusTimeOrder FROM LoggingInfo WHERE JobID=%d" % int(jobID)
144+
cmd = "SELECT Status,StatusTimeOrder FROM LoggingInfo WHERE JobID=%d ORDER BY StatusTimeOrder" % int(jobID)
145145
resCmd = self._query(cmd)
146146
if not resCmd["OK"]:
147147
return resCmd

0 commit comments

Comments
 (0)