ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/Checker.py
Revision: 1.9
Committed: Fri Feb 15 16:20:59 2008 UTC (17 years, 2 months ago) by ewv
Content type: text/x-python
Branch: MAIN
CVS Tags: CRAB_2_2_0_pre7, CRAB_2_1_2, CRAB_2_2_0_pre5, CRAB_2_1_2_pre2, CRAB_2_1_2_pre1, CRAB_2_2_0_pre4, CRAB_2_2_0_pre2, CRAB_2_1_1, CRAB_2_1_1_pre3, CRAB_2_2_0_pre1, CRAB_2_1_1_pre1, CRAB_2_1_0, CRAB_2_1_0_pre6
Branch point for: CRAB_2_1_2_br, CRAB_2_1_1_pre2
Changes since 1.8: +6 -3 lines
Log Message:
Checker for OSG

File Contents

# User Rev Content
1 slacapra 1.1 from Actor import *
2     import common
3    
4     class Checker(Actor):
5     def __init__(self, cfg_params, nj_list):
6     self.cfg_params = cfg_params
7     self.nj_list = nj_list
8     return
9 ewv 1.9
10 slacapra 1.1 def run(self):
11     """
12     The main method of the class.
13     """
14     common.logger.debug(5, "Checker::run() called")
15    
16     if len(self.nj_list)==0:
17     common.logger.debug(5, "No jobs to check")
18     return
19    
20     # run a list-match on first job
21     for nj in self.nj_list:
22 slacapra 1.7 block = common.jobDB.block(nj)
23 ewv 1.9 if common.scheduler.name().upper() != "CONDOR_G" :
24     match = common.scheduler.listMatch(nj, block, [], [])
25     else:
26     match = "1"
27 slacapra 1.2 flag = ''
28 ewv 1.9 if not match:
29 slacapra 1.6 flag=' NOT '
30     number=' '
31 fanzago 1.3 if match : number= str(match)
32 slacapra 1.5 common.logger.message("Job #"+str(nj+1)+" does "+flag+" matches " + number + " sites")
33 slacapra 1.1 pass
34    
35     return