12 |
|
""" |
13 |
|
The main method of the class: kill a complete task |
14 |
|
""" |
15 |
< |
common.logger.debug(5, "Killer::run() called") |
15 |
> |
common.logger.debug( "Killer::run() called") |
16 |
|
task = common._db.getTask(self.range) |
17 |
|
toBeKilled = [] |
18 |
|
for job in task.jobs: |
19 |
< |
if ( job.runningJob['status'] in ['SS','R','S','SR','SW']): |
19 |
> |
if ( job.runningJob['status'] in ['SU','SS','R','S','SR','SW']): |
20 |
|
toBeKilled.append(job['jobId']) |
21 |
|
else: |
22 |
< |
common.logger.message("Not possible to kill Job #"+str(job['jobId'])+" : Status is "+str(job.runningJob['statusScheduler'])) |
22 |
> |
common.logger.info("Not possible to kill Job #"+str(job['jobId'])+" : Status is "+str(job.runningJob['statusScheduler'])) |
23 |
|
pass |
24 |
|
|
25 |
|
if len(toBeKilled)>0: |
26 |
|
common.scheduler.cancel(toBeKilled) |
27 |
< |
common.logger.message("Jobs killed "+str(toBeKilled)) |
27 |
> |
common.logger.info("Jobs killed "+str(toBeKilled)) |