Revision: | 1.20 |
Committed: | Thu Feb 10 21:09:12 2011 UTC (14 years, 2 months ago) by belforte |
Content type: | text/x-python |
Branch: | MAIN |
CVS Tags: | CRAB_2_9_1, CRAB_2_9_1_pre2, CRAB_2_9_1_pre1, CRAB_2_9_0, CRAB_2_9_0_pre2, CRAB_2_9_0_pre1, CRAB_2_8_8, CRAB_2_8_8_pre1, CRAB_2_8_7_patch3, CRAB_2_8_7_patch2, CRAB_2_8_7_patch1, CRAB_2_8_7, CRAB_2_8_7_pre2, CRAB_2_8_7_pre1, CRAB_2_8_6, CRAB_2_8_6_pre1, CRAB_2_8_5_patch3, CRAB_2_8_5_patch2, CRAB_2_8_5_patch1, CRAB_2_8_5, CRAB_2_8_5_pre5, CRAB_2_8_5_pre4, CRAB_2_8_5_pre3, CRAB_2_8_4_patch3, CRAB_2_8_5_pre2, CRAB_2_8_4_patch2, CRAB_2_8_5_pre1, CRAB_2_8_4_patch1, CRAB_2_8_4, CRAB_2_8_4_pre5, CRAB_2_8_4_pre4, CRAB_2_8_4_pre3, CRAB_2_8_4_pre2, CRAB_2_8_4_pre1, CRAB_2_8_3, CRAB_2_8_3_pre4, CRAB_2_8_3_pre3, CRAB_2_8_3_pre2, CRAB_2_8_3_pre1, CRAB_2_8_2_patch1, CRAB_2_8_2, CRAB_2_8_2_pre5, CRAB_2_8_2_pre4, CRAB_2_8_2_pre3, CRAB_2_8_2_pre2, CRAB_2_8_2_pre1, CRAB_2_8_1, CRAB_2_8_0, CRAB_2_8_0_pre1, CRAB_2_7_10_pre3, CRAB_2_7_9_patch2_pre1, CRAB_2_7_10_pre2, CRAB_2_7_10_pre1, CRAB_2_7_9_patch1, CRAB_2_7_9, CRAB_2_7_9_pre5, CRAB_2_7_9_pre4, CRAB_2_7_9_pre3, CRAB_2_7_9_pre2, CRAB_2_7_8_patch2, CRAB_2_7_9_pre1, CRAB_2_7_8_patch2_pre1, CRAB_2_7_8_patch1, CRAB_2_7_8_patch1_pre1, CRAB_2_7_8, CRAB_2_7_8_pre3, CRAB_2_7_8_pre2, CRAB_2_7_8_dash3, CRAB_2_7_8_dash2, CRAB_2_7_8_dash, CRAB_2_7_8_pre1, HEAD |
Changes since 1.19: | +2 -2 lines |
Log Message: | reduce crab -match verbosity, see https://savannah.cern.ch/bugs/index.php?64130 |
# | Content |
---|---|
1 | from Actor import * |
2 | import common |
3 | import string |
4 | |
5 | class Checker(Actor): |
6 | def __init__(self, cfg_params, nj_list): |
7 | self.cfg_params = cfg_params |
8 | self.nj_list = nj_list |
9 | from WMCore.SiteScreening.BlackWhiteListParser import SEBlackWhiteListParser |
10 | seWhiteList = cfg_params.get('GRID.se_white_list',[]) |
11 | seBlackList = cfg_params.get('GRID.se_black_list',[]) |
12 | self.blackWhiteListParser = SEBlackWhiteListParser(seWhiteList, seBlackList, common.logger()) |
13 | self.datasetpath=self.cfg_params['CMSSW.datasetpath'] |
14 | if string.lower(self.datasetpath)=='none': |
15 | self.datasetpath = None |
16 | return |
17 | |
18 | def run(self): |
19 | """ |
20 | The main method of the class. |
21 | """ |
22 | common.logger.debug( "Checker::run() called") |
23 | |
24 | if len(self.nj_list)==0: |
25 | common.logger.debug( "No jobs to check") |
26 | return |
27 | |
28 | task=common._db.getTask(self.nj_list) |
29 | allMatch={} |
30 | |
31 | for job in task.jobs: |
32 | id_job = job['jobId'] |
33 | jobDest = job['dlsDestination'] |
34 | if not jobDest: jobDest=[] |
35 | dest = self.blackWhiteListParser.cleanForBlackWhiteList(jobDest, True) |
36 | |
37 | # only if some dest i s available or if dataset is None |
38 | if len(dest) > 0 or not self.datasetpath: |
39 | if ','.join(dest) in allMatch.keys(): |
40 | pass |
41 | else: |
42 | match = common.scheduler.listMatch(dest, True) |
43 | allMatch[','.join(dest)] = match |
44 | if len(match)>0: |
45 | common.logger.info("Found "+str(len(match))+" compatible CE(s) for job "+str(id_job)+" : "+str(match)) |
46 | else: |
47 | common.logger.info("No compatible site found, will not submit jobs "+str(id_job)) |
48 | pass |
49 | pass |
50 | else: |
51 | common.logger.info("No compatible site found, will not submit jobs "+str(id_job)) |
52 | return |