本文整理汇总了Python中WMCore.Services.RequestManager.RequestManager.RequestManager.getWorkQueue方法的典型用法代码示例。如果您正苦于以下问题:Python RequestManager.getWorkQueue方法的具体用法?Python RequestManager.getWorkQueue怎么用?Python RequestManager.getWorkQueue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.Services.RequestManager.RequestManager.RequestManager
的用法示例。
在下文中一共展示了RequestManager.getWorkQueue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getSiteInfoFromReqMgr
# 需要导入模块: from WMCore.Services.RequestManager.RequestManager import RequestManager [as 别名]
# 或者: from WMCore.Services.RequestManager.RequestManager.RequestManager import getWorkQueue [as 别名]
def getSiteInfoFromReqMgr(serviceURL):
""" get agent info from request mgr """
reqMgr = RequestManager({'endpoint':serviceURL})
#get information from global queue.
try:
queues = reqMgr.getWorkQueue()
except Exception, ex:
errorInfo = {}
errorInfo['site_name'] = serviceURL
return [errorInfo]
示例2: getAgentInfoFromReqMgr
# 需要导入模块: from WMCore.Services.RequestManager.RequestManager import RequestManager [as 别名]
# 或者: from WMCore.Services.RequestManager.RequestManager.RequestManager import getWorkQueue [as 别名]
def getAgentInfoFromReqMgr(serviceURL):
""" get agent info from request mgr """
reqMgr = RequestManager({'endpoint':serviceURL})
#get information from global queue.
try:
gQueues = reqMgr.getWorkQueue()
except Exception, ex:
errorInfo = {}
errorInfo['url'] = serviceURL
errorInfo['status'] = "Request Manager down: %s" % serviceURL
errorInfo['acdc'] = 'N/A'
return [errorInfo]
示例3: getAgentInfoFromReqMgr
# 需要导入模块: from WMCore.Services.RequestManager.RequestManager import RequestManager [as 别名]
# 或者: from WMCore.Services.RequestManager.RequestManager.RequestManager import getWorkQueue [as 别名]
def getAgentInfoFromReqMgr(serviceURL):
""" get agent info from request mgr """
reqMgr = RequestManager({'endpoint':serviceURL})
try:
if serviceURL.lower() == "local":
gQueues = getGlobalQueues()
else:
gQueues = reqMgr.getWorkQueue()
except Exception, ex:
logging.warning("Error: %s" % str(ex))
errorInfo = {}
errorInfo['url'] = serviceURL
errorInfo['status'] = "Request Manager down: %s" % serviceURL
errorInfo['acdc'] = 'N/A'
return [errorInfo]
示例4: getRequestInfoFromReqMgr
# 需要导入模块: from WMCore.Services.RequestManager.RequestManager import RequestManager [as 别名]
# 或者: from WMCore.Services.RequestManager.RequestManager.RequestManager import getWorkQueue [as 别名]
def getRequestInfoFromReqMgr(serviceURL):
""" get the request info from requestManager """
###TODO: add back when GlobalMonitor spins out as a separate application
service = RequestManager({'endpoint':serviceURL})
try:
### use request manager funtion directly
### TODO: remove this when GlobalMonitor spins out as a separate application
if serviceURL.lower() == "local":
baseResults = getOverview()
urls = getGlobalQueues()
else:
baseResults = service.getRequestNames()
urls = service.getWorkQueue()
except Exception, ex:
logging.error(str(ex))
return DFormatter.errorFormatter(serviceURL, "RequestManger Down")