本文整理汇总了Python中DIRAC.Interfaces.API.Dirac.Dirac.getJobLoggingInfo方法的典型用法代码示例。如果您正苦于以下问题:Python Dirac.getJobLoggingInfo方法的具体用法?Python Dirac.getJobLoggingInfo怎么用?Python Dirac.getJobLoggingInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.Interfaces.API.Dirac.Dirac
的用法示例。
在下文中一共展示了Dirac.getJobLoggingInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Dirac
# 需要导入模块: from DIRAC.Interfaces.API.Dirac import Dirac [as 别名]
# 或者: from DIRAC.Interfaces.API.Dirac.Dirac import getJobLoggingInfo [as 别名]
#!/bin/env python
import sys
from DIRAC.Core.Base import Script
Script.parseCommandLine()
from DIRAC.Interfaces.API.Job import Job
from DIRAC.Interfaces.API.Dirac import Dirac
dirac = Dirac()
jobid = sys.argv[1]
print dirac.status(jobid)
summary_file = str(jobid) + "_summary.txt"
dirac.getJobSummary(jobid, outputFile=summary_file, printOutput=True)
print dirac.getJobDebugOutput(jobid)
print dirac.getJobLoggingInfo(jobid, printOutput=False)
示例2: len
# 需要导入模块: from DIRAC.Interfaces.API.Dirac import Dirac [as 别名]
# 或者: from DIRAC.Interfaces.API.Dirac.Dirac import getJobLoggingInfo [as 别名]
import DIRAC
from DIRAC.Core.Base import Script
Script.setUsageMessage( '\n'.join( [ __doc__.split( '\n' )[1],
'Usage:',
' %s [option|cfgfile] ... JobID ...' % Script.scriptName,
'Arguments:',
' JobID: DIRAC Job ID' ] ) )
Script.parseCommandLine( ignoreErrors = True )
args = Script.getPositionalArgs()
if len( args ) < 1:
Script.showHelp()
from DIRAC.Interfaces.API.Dirac import Dirac, parseArguments
dirac = Dirac()
exitCode = 0
errorList = []
for job in parseArguments( args ):
result = dirac.getJobLoggingInfo( job, printOutput = True )
if not result['OK']:
errorList.append( ( job, result['Message'] ) )
exitCode = 2
for error in errorList:
print "ERROR %s: %s" % error
DIRAC.exit( exitCode )