34 |
|
raise CrabException('Istantiate DB Session : '+str(e)) |
35 |
|
|
36 |
|
try: |
37 |
< |
common.bossSession.installDB('$CRABPRODCOMMONPYTHON/ProdCommon/BossLite/DbObjects/setupDatabase-sqlite.sql') |
37 |
> |
common.bossSession.bossLiteDB.installDB('$CRABPRODCOMMONPYTHON/ProdCommon/BossLite/DbObjects/setupDatabase-sqlite.sql') |
38 |
|
except Exception, e : |
39 |
|
raise CrabException('DB Installation error : '+str(e)) |
40 |
|
return |
330 |
|
|
331 |
|
# Data alignment |
332 |
|
jobStatus = str(job.runningJob['statusScheduler']) |
333 |
< |
if rForJ.getAttribute('status') not in ['Created', 'Submitting', 'Unknown'] and \ |
333 |
> |
if rForJ.getAttribute('statusScheduler') not in ['Created', 'Submitting', 'Unknown'] and \ |
334 |
|
job.runningJob['statusScheduler'] != 'Cleared': |
335 |
|
job.runningJob['statusScheduler'] = str( rForJ.getAttribute('status') ) |
336 |
|
jobStatus = str(job.runningJob['statusScheduler']) |
352 |
|
# TODO cleared='0' field, how should it be handled/mapped in BL? #Fabio |
353 |
|
|
354 |
|
common.bossSession.updateDB( task ) |
355 |
– |
|
355 |
|
return |
356 |
+ |
|
357 |
+ |
# FIXME temporary method to verify what kind of submission to perform towards the server |
358 |
+ |
def checkIfNeverSubmittedBefore(self): |
359 |
+ |
for j in self.getTask().jobs: |
360 |
+ |
if j.runningJob['submission'] > 1 or j.runningJob['status'] != 'C' or \ |
361 |
+ |
j.runningJob['statusScheduler'] != 'Created': |
362 |
+ |
return False |
363 |
+ |
return True |
364 |
+ |
|
365 |
+ |
|