本文整理汇总了Python中WMCore.Services.WorkQueue.WorkQueue.WorkQueue.getChildQueues方法的典型用法代码示例。如果您正苦于以下问题:Python WorkQueue.getChildQueues方法的具体用法?Python WorkQueue.getChildQueues怎么用?Python WorkQueue.getChildQueues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.Services.WorkQueue.WorkQueue.WorkQueue
的用法示例。
在下文中一共展示了WorkQueue.getChildQueues方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getSiteInfoFromGlobalQueue
# 需要导入模块: from WMCore.Services.WorkQueue.WorkQueue import WorkQueue [as 别名]
# 或者: from WMCore.Services.WorkQueue.WorkQueue.WorkQueue import getChildQueues [as 别名]
def getSiteInfoFromGlobalQueue(serviceURL):
url, dbName = splitCouchServiceURL(serviceURL)
globalQ = WorkQueue(url, dbName)
try:
queues = globalQ.getChildQueues()
except Exception, ex:
errorInfo = {}
errorInfo['site_name'] = serviceURL
return [errorInfo]
示例2: getAgentInfoFromGlobalQueue
# 需要导入模块: from WMCore.Services.WorkQueue.WorkQueue import WorkQueue [as 别名]
# 或者: from WMCore.Services.WorkQueue.WorkQueue.WorkQueue import getChildQueues [as 别名]
def getAgentInfoFromGlobalQueue(serviceURL):
url, dbName = splitCouchServiceURL(serviceURL)
globalQ = WorkQueue(url, dbName)
try:
childQueues = globalQ.getChildQueues()
except Exception, ex:
errorInfo = {}
errorInfo['url'] = serviceURL
errorInfo['status'] = "Global Queue down: %s" % serviceURL
errorInfo['acdc'] = 'N/A'
return [errorInfo]
示例3: testWorkQueueService
# 需要导入模块: from WMCore.Services.WorkQueue.WorkQueue import WorkQueue [as 别名]
# 或者: from WMCore.Services.WorkQueue.WorkQueue.WorkQueue import getChildQueues [as 别名]
def testWorkQueueService(self):
# test getWork
specName = "RerecoSpec"
specUrl = self.specGenerator.createReRecoSpec(specName, "file")
globalQ = globalQueue(DbName = 'workqueue_t',
QueueURL = self.testInit.couchUrl)
self.assertTrue(globalQ.queueWork(specUrl, "RerecoSpec", "teamA") > 0)
wqApi = WorkQueueDS(self.testInit.couchUrl, 'workqueue_t')
#This only checks minimum client call not exactly correctness of return
# values.
self.assertEqual(wqApi.getTopLevelJobsByRequest(),
[{'total_jobs': 2, 'request_name': specName}])
self.assertEqual(wqApi.getChildQueues(), [])
self.assertEqual(wqApi.getJobStatusByRequest(),
[{'status': 'Available', 'jobs': 2, 'request_name': specName}])
self.assertEqual(wqApi.getChildQueuesByRequest(), [])
self.assertEqual(wqApi.getWMBSUrl(), [])
self.assertEqual(wqApi.getWMBSUrlByRequest(), [])