Skip to content

Commit

Permalink
not to update supErrorDiag if already finished
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaeno committed Aug 19, 2019
1 parent 91c5e23 commit 5882de8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandaserver/taskbuffer/OraDBProxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20751,7 +20751,7 @@ def updateWorkers(self, harvesterID, data, useCommit=True):
sqlJAE = "UPDATE ATLAS_PANDA.jobsActive4 SET taskBufferErrorCode=:code,taskBufferErrorDiag=:diag "
sqlJAE += "WHERE PandaID=:PandaID "
sqlJSE = "UPDATE {0} SET supErrorCode=:code,supErrorDiag=:diag,stateChangeTime=CURRENT_DATE "
sqlJSE += "WHERE PandaID=:PandaID AND modificationTime>CURRENT_DATE-30"
sqlJSE += "WHERE PandaID=:PandaID AND NOT jobStatus IN (:finished) AND modificationTime>CURRENT_DATE-30"
varMap = dict()
varMap[':harvesterID'] = harvesterID
varMap[':workerID'] = workerData['workerID']
Expand Down Expand Up @@ -20792,6 +20792,7 @@ def updateWorkers(self, harvesterID, data, useCommit=True):
varMap[':code'] = workerSpec.errorCode
varMap[':diag'] = "Diag from worker : {0}".format(workerSpec.diagMessage)
varMap[':diag'] = JobSpec.truncateStringAttr('supErrorDiag', varMap[':diag'])
varMap[':finished'] = 'finished'
self.cur.execute(sqlJSE.format(tableName)+comment, varMap)
"""
varMap = dict()
Expand Down

0 comments on commit 5882de8

Please sign in to comment.