def updateJobStateTest(self, job, thisSite, workerNode, recoveryAttempt=0, mode=""): """ update the job state file """ # NOTE: this function will eventually replace pilot::updateJobState() when new job rec is in place status = False # IGNORE TEST MODE mode = "" # create a job state object and give it the current job state information JS = JobState() if JS.put(job, thisSite, workerNode, recoveryAttempt=recoveryAttempt, mode=mode): if recoveryAttempt > 0: tolog( "Successfully updated job state file (recovery attempt number: %d) with state: %s" % (recoveryAttempt, job.jobState)) else: tolog("Successfully updated job state file with state: %s" % (job.jobState)) status = True else: self.__pilotErrorDiag = "Failed to update job state file" tolog(self.__errorString % self.__pilotErrorDiag) return status
def updateJobStateTest(self, job, thisSite, workerNode, recoveryAttempt=0, mode=""): """ update the job state file """ # NOTE: this function will eventually replace pilot::updateJobState() when new job rec is in place status = False # create a job state object and give it the current job state information JS = JobState() if JS.put(job, thisSite, workerNode, recoveryAttempt=recoveryAttempt, mode=mode): if recoveryAttempt > 0: tolog("Successfully updated job state file (recovery attempt number: %d) with state: %s" % (recoveryAttempt, job.jobState)) else: tolog("Successfully updated job state file with state: %s" % (job.jobState)) status = True else: self.__pilotErrorDiag = "Failed to update job state file" tolog(self.__errorString % self.__pilotErrorDiag) return status