ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/SchedulerCaf.py
Revision: 1.5
Committed: Mon Apr 28 22:33:45 2008 UTC (17 years ago) by spiga
Content type: text/x-python
Branch: MAIN
Changes since 1.4: +2 -3 lines
Log Message:
added protection

File Contents

# Content
1 from Scheduler import Scheduler
2 from SchedulerLsf import SchedulerLsf
3 from crab_exceptions import *
4 from crab_logger import Logger
5 import common
6
7 import os,string
8
9 #
10 # Naming convention:
11 # methods starting with 'ws' are responsible to provide
12 # corresponding part of the job script ('ws' stands for 'write script').
13 #
14
15 class SchedulerCaf(SchedulerLsf) :
16
17 def __init__(self):
18 SchedulerLsf.__init__(self)
19 Scheduler.__init__(self,"CAF")
20
21 return
22
23 def configure(self, cfg_params):
24 """
25 CAF is just a special queue and resources for LSF at CERN
26 """
27 SchedulerLsf.configure(self, cfg_params)
28 self.queue = cfg_params.get(self.name().upper()+'.queue','dedicated')
29 self.res = cfg_params.get(self.name().upper()+'.resource','cmscaf')
30 def wsSetupEnvironment(self):
31 """
32 Returns part of a job script which does scheduler-specific work.
33 """
34 txt = SchedulerLsf.wsSetupEnvironment(self)
35 txt += '# CAF specific stuff\n'
36 txt += 'middleware=CAF \n'
37 txt += 'export STAGE_SVCCLASS=cmscaf \n'
38
39 return txt
40