本文整理匯總了Python中DIRAC.WorkloadManagementSystem.DB.PilotAgentsDB.PilotAgentsDB.getPilotsForJobID方法的典型用法代碼示例。如果您正苦於以下問題:Python PilotAgentsDB.getPilotsForJobID方法的具體用法?Python PilotAgentsDB.getPilotsForJobID怎麽用?Python PilotAgentsDB.getPilotsForJobID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DIRAC.WorkloadManagementSystem.DB.PilotAgentsDB.PilotAgentsDB
的用法示例。
在下文中一共展示了PilotAgentsDB.getPilotsForJobID方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: printTable
# 需要導入模塊: from DIRAC.WorkloadManagementSystem.DB.PilotAgentsDB import PilotAgentsDB [as 別名]
# 或者: from DIRAC.WorkloadManagementSystem.DB.PilotAgentsDB.PilotAgentsDB import getPilotsForJobID [as 別名]
labels = ['pilotUUID', 'timestamp', 'source', 'phase', 'status', 'messageContent']
for log in logs:
content.append([log[label] for label in labels])
printTable(labels, content, numbering=False, columnSeparator=' | ')
if uuid:
pilotsLogging = PilotsLoggingClient()
result = pilotsLogging.getPilotsLogging(uuid)
if not result['OK']:
print 'ERROR: %s' % result['Message']
DIRAC.exit(1)
printPilotsLogging(result['Value'])
DIRAC.exit(0)
else:
pilotDB = PilotAgentsDB()
pilotsLogging = PilotsLoggingClient()
pilots = pilotDB.getPilotsForJobID(jobid)
if not pilots['OK ']:
print pilots['Message']
for pilotID in pilots:
info = pilotDB.getPilotInfo(pilotID=pilotID)
if not info['OK']:
print info['Message']
for pilot in info:
logging = pilotsLogging.getPilotsLogging(pilot['PilotJobReference'])
if not logging['OK']:
print logging['Message']
printPilotsLogging(logging)
DIRAC.exit(0)