本文整理汇总了Python中DIRAC.Interfaces.API.Job.Job.setExecutionEnv方法的典型用法代码示例。如果您正苦于以下问题:Python Job.setExecutionEnv方法的具体用法?Python Job.setExecutionEnv怎么用?Python Job.setExecutionEnv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.Interfaces.API.Job.Job
的用法示例。
在下文中一共展示了Job.setExecutionEnv方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: dexit
# 需要导入模块: from DIRAC.Interfaces.API.Job import Job [as 别名]
# 或者: from DIRAC.Interfaces.API.Job.Job import setExecutionEnv [as 别名]
shifter = op.getValue("Pipeline/Shifter","/DC=org/DC=doegrids/OU=People/CN=Stephan Zimmer 799865")
shifter_group = op.getValue("Pipeline/ShifterGroup","glast_user")
result = gProxyManager.downloadProxyToFile(shifter,shifter_group,requiredTimeLeft=10000)
if not result['OK']:
gLogger.error("No valid proxy found; ",result['Message'])
dexit(1)
proxy = result[ 'Value' ]
os.environ['X509_USER_PROXY'] = proxy
gLogger.info("using proxy %s"%proxy)
j = Job(stdout="logFile.txt",stderr="logFile.txt") # specifies the logfile
input_sandbox_files = []
output_sandbox_files = ["logFile.txt", "jobmeta.inf"]
if pipeline:
j.setExecutionEnv(pipeline_dict) # that sets the env vars
if pipeline_dict.has_key("GPL_CONFIGDIR"):
GPL_CONFIGDIR = pipeline_dict['GPL_CONFIGDIR']
files = []
if os.path.isdir(GPL_CONFIGDIR):
files_to_copy = glob.glob("%s/*"%GPL_CONFIGDIR)
for f in files_to_copy:
if os.path.isfile(f):
input_sandbox_files.append(os.path.abspath(f))
else:
input_sandbox_files.append(f)
if pipeline_dict.has_key("DIRAC_OSB"):
DIRAC_OUTPUTSANDBOX = pipeline_dict["DIRAC_OSB"]
files = DIRAC_OUTPUTSANDBOX.split(",")
for f in files:
output_sandbox_files.append(f)