-
Notifications
You must be signed in to change notification settings - Fork 3
/
runGlobalQMonitor.py
33 lines (26 loc) · 1.16 KB
/
runGlobalQMonitor.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from __future__ import print_function
from WMCore.WorkQueue.WorkQueue import globalQueue
### Same configuration as defined in the deployment scripts
BASE_URL = "https://cmsweb.cern.ch"
COUCH_URL = "%s/couchdb" % BASE_URL
REQMGR2 = "%s/reqmgr2" % BASE_URL
WEBURL = "%s/%s" % (COUCH_URL, "workqueue")
LOG_DB_URL = "%s/wmstats_logdb" % COUCH_URL
LOG_REPORTER = "global_workqueue"
queueParams = {}
queueParams['CouchUrl'] = COUCH_URL
queueParams['DbName'] = "workqueue"
queueParams['InboxDbName'] = "workqueue_inbox"
queueParams['WMStatsCouchUrl'] = "%s/%s" % (COUCH_URL, "wmstats")
queueParams['QueueURL'] = WEBURL
queueParams['ReqMgrServiceURL'] = REQMGR2
queueParams['RequestDBURL'] = "%s/%s" % (COUCH_URL, "reqmgr_workload_cache")
queueParams['central_logdb_url'] = LOG_DB_URL
queueParams['log_reporter'] = LOG_REPORTER
queueParams['rucioAccount'] = "wmcore_transferor"
queueParams['rucioAuthUrl'] = "https://cms-rucio-auth.cern.ch"
queueParams['rucioUrl'] = "http://cms-rucio.cern.ch"
globalQ = globalQueue(**queueParams)
initialStatus = ['Available', 'Negotiating', 'Acquired']
results = globalQ.monitorWorkQueue(initialStatus)
print("Collected results: {}".format(results))