本文整理汇总了Python中WMCore.Services.WMStats.WMStatsWriter.WMStatsWriter.updateLogArchiveLFN方法的典型用法代码示例。如果您正苦于以下问题:Python WMStatsWriter.updateLogArchiveLFN方法的具体用法?Python WMStatsWriter.updateLogArchiveLFN怎么用?Python WMStatsWriter.updateLogArchiveLFN使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.Services.WMStats.WMStatsWriter.WMStatsWriter
的用法示例。
在下文中一共展示了WMStatsWriter.updateLogArchiveLFN方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AccountantWorker
# 需要导入模块: from WMCore.Services.WMStats.WMStatsWriter import WMStatsWriter [as 别名]
# 或者: from WMCore.Services.WMStats.WMStatsWriter.WMStatsWriter import updateLogArchiveLFN [as 别名]
#.........这里部分代码省略.........
self.listOfJobsToFail.append(wmbsJob)
return jobSuccess
def associateLogCollectToParentJobsInWMStats(self, fwkJobReport, logAchiveLFN, task):
"""
_associateLogCollectToParentJobsInWMStats_
Associate a logArchive output to its parent job
"""
inputFileList = fwkJobReport.getAllInputFiles()
requestName = task.split('/')[1]
keys = []
for inputFile in inputFileList:
keys.append([requestName, inputFile["lfn"]])
resultRows = self.fwjrCouchDB.loadView("FWJRDump", 'jobsByOutputLFN',
options = {"stale": "update_after"},
keys = keys)['rows']
if len(resultRows) > 0:
#get data from wmbs
parentWMBSJobIDs = []
for row in resultRows:
parentWMBSJobIDs.append({"jobid": row["value"]})
#update Job doc in wmstats
results = self.getJobInfoByID.execute(parentWMBSJobIDs)
parentJobNames = []
if isinstance(results, list):
for jobInfo in results:
parentJobNames.append(jobInfo['name'])
else:
parentJobNames.append(results['name'])
self.localWMStats.updateLogArchiveLFN(parentJobNames, logAchiveLFN)
else:
#TODO: if the couch db is consistent with DB this should be removed (checking resultRow > 0)
#It need to be failed and retried.
logging.error("job report is missing for updating log archive mapping\n Input file list\n %s" % inputFileList)
return
def createMissingFWKJR(self, parameters, errorCode = 999,
errorDescription = 'Failure of unknown type'):
"""
_createMissingFWJR_
Create a missing FWJR if the report can't be found by the code in the
path location.
"""
report = Report()
report.addError("cmsRun1", 84, errorCode, errorDescription)
report.data.cmsRun1.status = "Failed"
return report
def createFilesInDBSBuffer(self):
"""
_createFilesInDBSBuffer_
It does the actual job of creating things in DBSBuffer
WARNING: This assumes all files in a job have the same final location
"""
if len(self.dbsFilesToCreate) == 0:
# Whoops, nothing to do!
return
dbsFileTuples = []
dbsFileLoc = []