本文整理汇总了Python中WMCore.Services.WMStats.WMStatsReader.WMStatsReader.isWorkflowCompletedWithLogCollectAndCleanUp方法的典型用法代码示例。如果您正苦于以下问题:Python WMStatsReader.isWorkflowCompletedWithLogCollectAndCleanUp方法的具体用法?Python WMStatsReader.isWorkflowCompletedWithLogCollectAndCleanUp怎么用?Python WMStatsReader.isWorkflowCompletedWithLogCollectAndCleanUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.Services.WMStats.WMStatsReader.WMStatsReader
的用法示例。
在下文中一共展示了WMStatsReader.isWorkflowCompletedWithLogCollectAndCleanUp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: FinishedStatusInfo
# 需要导入模块: from WMCore.Services.WMStats.WMStatsReader import WMStatsReader [as 别名]
# 或者: from WMCore.Services.WMStats.WMStatsReader.WMStatsReader import isWorkflowCompletedWithLogCollectAndCleanUp [as 别名]
class FinishedStatusInfo(RESTEntity):
"""
This class need to move under WMStats server when wmstats server created
"""
def __init__(self, app, api, config, mount):
# main CouchDB database where requests/workloads are stored
RESTEntity.__init__(self, app, api, config, mount)
wmstats_url = "%s/%s" % (self.config.couch_host, self.config.couch_wmstats_db)
reqdb_url = "%s/%s" % (self.config.couch_host, self.config.couch_reqmgr_db)
self.wmstats = WMStatsReader(wmstats_url, reqdbURL=reqdb_url, reqdbCouchApp="ReqMgr")
def validate(self, apiobj, method, api, param, safe):
args_length = len(param.args)
if args_length == 1:
safe.args.append(param.args[0])
param.args.pop()
return
@restcall(formats = [('application/json', JSONFormat())])
@tools.expires(secs=-1)
def get(self, request_name):
try:
result = self.wmstats.isWorkflowCompletedWithLogCollectAndCleanUp(request_name)
except KeyError:
raise cherrypy.HTTPError(404, "Cannot find request: %s" % request_name)
return rows([result])