350 |
|
if r.getAttribute('id') in [ id, 'all']: |
351 |
|
rForJ = r |
352 |
|
break |
353 |
+ |
|
354 |
+ |
# check if rForJ is None |
355 |
+ |
if rForJ is None: |
356 |
+ |
common.logger.debug( "Missing XML element for job %s, skip update status"%str(id) ) |
357 |
+ |
continue |
358 |
+ |
|
359 |
|
## Check the submission number and create new running jobs on the client side |
360 |
|
if rForJ.getAttribute('resubmit') != 'None' and (rForJ.getAttribute('status') not in ['Cleared','Killed','Done','Done (Failed)','Not Submitted', 'Cancelled by user']) : |
361 |
|
if int(job.runningJob['submission']) < int(rForJ.getAttribute('resubmit')) + 1: |
400 |
|
|
401 |
|
job.runningJob['state'] = str( rForJ.getAttribute('action') ) |
402 |
|
|
403 |
< |
#if str( rForJ.getAttribute('resubmit') ).isdigit(): |
404 |
< |
# job['submissionNumber'] = int(rForJ.getAttribute('resubmit')) |
405 |
< |
# job.runningJob['submission'] = int(rForJ.getAttribute('resubmit')) |
403 |
> |
# Needed for unique naming of the output. |
404 |
> |
# GIVES PROBLEMS. FIX in >=2_7_2 |
405 |
> |
#job.runningJob['submission'] = str(rForJ.getAttribute('submission')) |
406 |
|
|
401 |
– |
# TODO cleared='0' field, how should it be handled/mapped in BL? #Fabio |
402 |
– |
|
407 |
|
common.bossSession.updateDB( task_new ) |
408 |
|
return |
409 |
|
|