ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/Killer.py
(Generate patch)

Comparing COMP/CRAB/python/Killer.py (file contents):
Revision 1.2 by spiga, Mon Apr 14 16:36:31 2008 UTC vs.
Revision 1.4 by spiga, Tue Apr 15 10:03:19 2008 UTC

# Line 15 | Line 15 | class Killer(Actor):
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.")
# Line 25 | Line 24 | class Killer(Actor):
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 "+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))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines