Public Member Functions | |
def | __init__ |
def | Apply |
Job termination analysis object. Based on output returned and past history decides what to do next. This class inherits from GBSJobAnalyser and adds support for the retry request NEW_SEED by renaming the job to the next free subrun number for the job's run number.
Definition at line 4 of file MinosRSMJobAnalyser.py.
def minos::MinosRSMJobAnalyser::MinosRSMJobAnalyser::__init__ | ( | self, | ||
name, | ||||
parent, | ||||
model, | ||||
model_args | ||||
) |
def minos::MinosRSMJobAnalyser::MinosRSMJobAnalyser::Apply | ( | self | ) |
Apply results of analysis to client job dealing with NEW_SEED request.
Definition at line 10 of file MinosRSMJobAnalyser.py.
00013 : 00014 GBSJobAnalyser.__init__(self,name,parent,model,model_args) 00015 00016 def Apply(self): 00017 00018 """Apply results of analysis to client job dealing with NEW_SEED request.""" 00019 00020 job = self.GetJob() 00021 00022 if not job or not re.search("NEW_SEED",self.GetRetryArgs()): 00023 GBSJobAnalyser.Apply(self) 00024 return 00025 run = job.GetRun() 00026 subrun = job.GetSubrun() 00027 task = job.GetParent() 00028 job_list = task.GetJobs("job_%8.8d_.*" % run) 00029 max_subrun = 0 00030 for j_name,j in job_list.iteritems(): max_subrun = max(max_subrun,j.GetSubrun()) 00031 max_subrun += 1 00032 task.RenameJob(job.GetName(),"job_%8.8d_%4.4d" % (run,max_subrun)) 00033 GBSJobAnalyser.Apply(self) 00034 jobTryDir = job._GetTryOutputDir() 00035 gbs_log_file_spec = jobTryDir + "/" + job._GetGbsLogFileName() 00036 f = open(gbs_log_file_spec,'a') 00037 f.write(" Rename subrun %d - > %d" % (subrun,max_subrun)) f.write(" - This explains the 'GBS_JOB_ANALYSIS Unable to find file, recreating it'")