本文整理汇总了Python中DIRAC.WorkloadManagementSystem.DB.TaskQueueDB.TaskQueueDB.recalculateTQSharesForAll方法的典型用法代码示例。如果您正苦于以下问题:Python TaskQueueDB.recalculateTQSharesForAll方法的具体用法?Python TaskQueueDB.recalculateTQSharesForAll怎么用?Python TaskQueueDB.recalculateTQSharesForAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.WorkloadManagementSystem.DB.TaskQueueDB.TaskQueueDB
的用法示例。
在下文中一共展示了TaskQueueDB.recalculateTQSharesForAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initializeMatcherHandler
# 需要导入模块: from DIRAC.WorkloadManagementSystem.DB.TaskQueueDB import TaskQueueDB [as 别名]
# 或者: from DIRAC.WorkloadManagementSystem.DB.TaskQueueDB.TaskQueueDB import recalculateTQSharesForAll [as 别名]
def initializeMatcherHandler( serviceInfo ):
""" Matcher Service initialization
"""
global gJobDB
global gJobLoggingDB
global gTaskQueueDB
global gPilotAgentsDB
gJobDB = JobDB()
gJobLoggingDB = JobLoggingDB()
gTaskQueueDB = TaskQueueDB()
gPilotAgentsDB = PilotAgentsDB()
gMonitor.registerActivity( 'matchTime', "Job matching time",
'Matching', "secs" , gMonitor.OP_MEAN, 300 )
gMonitor.registerActivity( 'matchesDone', "Job Match Request",
'Matching', "matches" , gMonitor.OP_RATE, 300 )
gMonitor.registerActivity( 'matchesOK', "Matched jobs",
'Matching', "matches" , gMonitor.OP_RATE, 300 )
gMonitor.registerActivity( 'numTQs', "Number of Task Queues",
'Matching', "tqsk queues" , gMonitor.OP_MEAN, 300 )
gTaskQueueDB.recalculateTQSharesForAll()
gThreadScheduler.addPeriodicTask( 120, gTaskQueueDB.recalculateTQSharesForAll )
gThreadScheduler.addPeriodicTask( 60, sendNumTaskQueues )
sendNumTaskQueues()
return S_OK()
示例2: initializeMatcherHandler
# 需要导入模块: from DIRAC.WorkloadManagementSystem.DB.TaskQueueDB import TaskQueueDB [as 别名]
# 或者: from DIRAC.WorkloadManagementSystem.DB.TaskQueueDB.TaskQueueDB import recalculateTQSharesForAll [as 别名]
def initializeMatcherHandler(serviceInfo):
""" Matcher Service initialization
"""
global jobDB
global jobLoggingDB
global taskQueueDB
jobDB = JobDB()
jobLoggingDB = JobLoggingDB()
taskQueueDB = TaskQueueDB()
gMonitor.registerActivity("matchTime", "Job matching time", "Matching", "secs", gMonitor.OP_MEAN, 300)
gMonitor.registerActivity(
"matchTaskQueues", "Task queues checked per job", "Matching", "task queues", gMonitor.OP_MEAN, 300
)
gMonitor.registerActivity("matchesDone", "Job Matches", "Matching", "matches", gMonitor.OP_MEAN, 300)
gMonitor.registerActivity("numTQs", "Number of Task Queues", "Matching", "tqsk queues", gMonitor.OP_MEAN, 300)
taskQueueDB.recalculateTQSharesForAll()
gThreadScheduler.addPeriodicTask(120, taskQueueDB.recalculateTQSharesForAll)
gThreadScheduler.addPeriodicTask(120, sendNumTaskQueues)
sendNumTaskQueues()
return S_OK()