8 |
|
import string,os |
9 |
|
|
10 |
|
class ScriptWriter: |
11 |
< |
def __init__(self, cfg_params, template): |
11 |
> |
def __init__(self, cfg_params, template): |
12 |
|
# pattern -> action |
13 |
|
self.actions = { |
14 |
|
'title' : self.title_, |
15 |
|
'untar_software' : self.untarSoftware_, |
16 |
+ |
'initial_environment' : self.initialEnvironment_, |
17 |
|
'setup_scheduler_environment' : self.setupSchedulerEnvironment_, |
18 |
|
'setup_jobtype_environment' : self.setupJobTypeEnvironment_, |
19 |
|
'copy_input' : self.copyInput_, |
47 |
|
self.debug_pset='' |
48 |
|
debug = cfg_params.get('USER.debug_pset',False) |
49 |
|
if debug: self.debug_pset='--debug' |
50 |
< |
|
50 |
> |
|
51 |
|
return |
52 |
|
|
53 |
|
def setAction(self, pattern, action): |
114 |
|
txt = common.scheduler.wsSetupEnvironment() |
115 |
|
return txt |
116 |
|
|
117 |
+ |
def initialEnvironment_(self): |
118 |
+ |
""" |
119 |
+ |
Returns part of a job script which does scheduler-specific work. |
120 |
+ |
""" |
121 |
+ |
txt = common.scheduler.wsInitialEnvironment() |
122 |
+ |
return txt |
123 |
+ |
|
124 |
|
def setupJobTypeEnvironment_(self): |
125 |
|
""" |
126 |
|
Returns part of a job script which does jobtype-specific work. |
200 |
|
|
201 |
|
def func_exit_(self): |
202 |
|
""" |
203 |
< |
Returns part of a job script which does scheduler-specific |
203 |
> |
Returns part of a job script which does scheduler-specific |
204 |
|
output checks and management. |
205 |
|
""" |
206 |
|
txt = common.scheduler.wsExitFunc() |