ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/jobSitter.py
(Generate patch)

Comparing UserCode/MitProd/Processing/bin/jobSitter.py (file contents):
Revision 1.4 by paus, Tue Aug 3 04:16:26 2010 UTC vs.
Revision 1.7 by paus, Tue Mar 22 02:48:51 2011 UTC

# Line 197 | Line 197 | for line in os.popen(cmd).readlines():
197  
198   # Process the crab tasks determined to be relevant in the last query
199   print '\n=============================================================================='
200 < print ' Process crab task list (please wait, crab commands are first fully parsed)\n'
200 > print ' Process crab task list\n'
201   i = 0
202   for crabTask in crabTasks:
203  
204 +    print '\n------------------------------------------------------------------------------'
205 +    print '  --> PREPPING ' + crabTask.tag \
206 +          + '\n       -> ' + crabTask.mitDataset
207 +    print '------------------------------------------------------------------------------\n'
208 +
209      dataset     = crabTask.cmsDataset
210      storageEle  = crabTask.storageEle
211      storagePath = crabTask.storagePath
# Line 244 | Line 249 | for crabTask in crabTasks:
249            + '\n       -> ' + storageEle \
250            + '\n       -> ' + storagePath
251      print '------------------------------------------------------------------------------\n'
252 <    print '  --> ' + cmd
252 >    #print '  --> ' + cmd
253  
254      if catalog != 0:
255              os.system(cmd)
# Line 257 | Line 262 | for crabTask in crabTasks:
262      if extend == 1:
263          cmd = 'crab -extend -c ' + crabTask.tag
264          print '\n------------------------------------------------------------------------------'
265 <        print '  --> EXTEND ' + crabTask.tag + ' -- wait crab commands first fully parsed -- ' \
265 >        print '  --> EXTEND ' + crabTask.tag + ' -- ' \
266                + '\n       -> ' + dataset   + '  (' + crabTask.mitDataset + ')'\
267                + '\n       -> ' + storageEle \
268                + '\n       -> ' + storagePath
# Line 266 | Line 271 | for crabTask in crabTasks:
271          os.system(cmd)
272  
273      print '\n------------------------------------------------------------------------------'
274 <    print '  --> STATUS ' + crabTask.tag + ' -- wait crab commands first fully parsed -- ' \
274 >    print '  --> STATUS ' + crabTask.tag + ' -- ' \
275            + '\n       -> ' + dataset   + '  (' + crabTask.mitDataset + ')'\
276            + '\n       -> ' + storageEle \
277            + '\n       -> ' + storagePath
# Line 283 | Line 288 | for crabTask in crabTasks:
288          print ' Task status: ' + crabTask.status
289          if crabTask.status == 'completed' or crabTask.status == 'finished':
290              crabTask.remove(clean)
291 <            print ' INFO - crab task has been removed, continuing.'
291 >            print ' INFO - crab task has been removed, continuing.\n'
292              continue
293          print ' '
294  
# Line 315 | Line 320 | for crabTask in crabTasks:
320                  subList += '%d'%(status.index)
321              else:
322                  subList += ',%d'%(status.index)
323 <        if ((status.tag == 'Aborted'  or status.exitCode > 0 or status.exitStatus > 0) or
324 <            (status.tag == 'Retrieved' and status.outputFile == 0)):
323 >        if ((status.tag == 'Aborted'  or status.exitCode > 0 or status.exitStatus > 0)):
324 >        ##or(status.tag == 'Retrieved' and status.outputFile == 0)):
325              status.showCompact()
326              if resubList == '':
327                  resubList += '%d'%(status.index)
# Line 330 | Line 335 | for crabTask in crabTasks:
335          if not re.search('-',subList) and not re.search(',',subList):
336              subList = subList + ',999999999'
337          cmd = 'crab -c ' + crabTask.tag + ' -submit ' + subList
338 <        print '\nACTION -- SUBMIT.PY: ' + cmd
339 <        if exe == 1:
340 <            status = os.system(cmd)
338 >        ##print '\nACTION -- SUBMIT.PY: ' + cmd
339 >        ##if exe == 1:
340 >        ##    status = os.system(cmd)
341      if resubList != '':
342          cmd = 'crab -c ' + crabTask.tag + ' -resubmit ' + resubList
343 <        print '\nACTION -- RE-SUBMIT.PY: ' + cmd
344 <        if exe == 1:
345 <            status = os.system(cmd)
343 >        ##print '\nACTION -- RE-SUBMIT.PY: ' + cmd
344 >        ##if exe == 1:
345 >        ##    status = os.system(cmd)
346  
347  
348      cmd = 'crab -getoutput -continue ' + crabTask.tag
349      print '\n------------------------------------------------------------------------------'
350 <    print '  --> GETOUTPUT ' + crabTask.tag + ' -- wait crab commands first fully parsed -- ' \
350 >    print '  --> GETOUTPUT ' + crabTask.tag + ' -- ' \
351            + '\n       -> ' + dataset \
352            + '\n       -> ' + storageEle \
353            + '\n       -> ' + storagePath

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines