本文整理汇总了Python中DIRAC.Interfaces.API.DiracAdmin.DiracAdmin.getPilotLoggingInfo方法的典型用法代码示例。如果您正苦于以下问题:Python DiracAdmin.getPilotLoggingInfo方法的具体用法?Python DiracAdmin.getPilotLoggingInfo怎么用?Python DiracAdmin.getPilotLoggingInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.Interfaces.API.DiracAdmin.DiracAdmin
的用法示例。
在下文中一共展示了DiracAdmin.getPilotLoggingInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getPilotLoggingInfo
# 需要导入模块: from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin [as 别名]
# 或者: from DIRAC.Interfaces.API.DiracAdmin.DiracAdmin import getPilotLoggingInfo [as 别名]
def getPilotLoggingInfo(gridID):
output = ""
diracAdmin = DiracAdmin()
result = diracAdmin.getPilotLoggingInfo( gridID )
if not result['OK']:
output = 'ERROR retrieving pilot logging info, %s'%str(result['Message'])
gLogger.error(output)
else:
output = result['Value']
return output
示例2: len
# 需要导入模块: from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin [as 别名]
# 或者: from DIRAC.Interfaces.API.DiracAdmin.DiracAdmin import getPilotLoggingInfo [as 别名]
' %s [option|cfgfile] ... PilotID ...' % Script.scriptName,
'Arguments:',
' PilotID: Grid ID of the pilot' ] ) )
Script.parseCommandLine( ignoreErrors = True )
args = Script.getPositionalArgs()
if len( args ) < 1:
Script.showHelp()
from DIRAC import exit as DIRACExit
from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin
diracAdmin = DiracAdmin()
exitCode = 0
errorList = []
for gridID in args:
result = diracAdmin.getPilotLoggingInfo( gridID )
if not result['OK']:
errorList.append( ( gridID, result['Message'] ) )
exitCode = 2
else:
print 'Pilot Reference: %s', gridID
print result['Value']
print
for error in errorList:
print "ERROR %s: %s" % error
DIRACExit( exitCode )