15 |
|
common.logger.debug(5, "Killer::run() called") |
16 |
|
|
17 |
|
jStatus=common._db.queryRunJob('status','all') |
18 |
< |
|
18 |
> |
human_status = common._db.queryRunJob('statusScheduler','all') |
19 |
|
toBeKilled = [] |
20 |
– |
print jStatus |
20 |
|
for id in self.range: |
21 |
|
if id not in common._db.nJobs("list"): |
22 |
|
common.logger.message("Warning: job # "+str(id)+" doesn't exists! Not possible to kill it.") |
24 |
|
if ( jStatus[id-1] in ['SS','R']): |
25 |
|
toBeKilled.append(id) |
26 |
|
else: |
27 |
< |
common.logger.message("Not possible to kill Job #"+str(id)+" : Status is "+jStatus[id-1]) |
27 |
> |
common.logger.message("Not possible to kill Job #"+str(id)+" : Status is "+str(human_status[id-1])) |
28 |
|
pass |
29 |
|
pass |
30 |
|
|
31 |
< |
common.scheduler.cancel(toBeKilled) |
32 |
< |
common.logger.message("Jobs killed "+str(toBeKilled)) |
31 |
> |
if len(toBeKilled)>0: |
32 |
> |
common.scheduler.cancel(toBeKilled) |
33 |
> |
common.logger.message("Jobs killed "+str(toBeKilled)) |