Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit a289575

Browse files
committed
using cric for data-processing mapping
1 parent de3dbe4 commit a289575

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,7 +1943,8 @@ def default_expiration():
19431943
'data' : None,
19441944
'timestamp' : time.mktime( time.gmtime()),
19451945
'expiration' : default_expiration(),
1946-
'getter' : lambda : getSiteStorage('cmsweb.cern.ch'),
1946+
#'getter' : lambda : getSiteStorage('cmsweb.cern.ch'),
1947+
'getter' : lambda : getSiteStorage('cms-cric.cern.ch'),
19471948
'cachefile' : None,
19481949
'default' : ""
19491950
}
@@ -2069,8 +2070,8 @@ def getNodeQueue(url, node):
20692070

20702071
def getSiteStorage(url):
20712072
conn = make_x509_conn(url)
2072-
#conn = httplib.HTTPSConnection(url, cert_file = os.getenv('X509_USER_PROXY'), key_file = os.getenv('X509_USER_PROXY'))
2073-
r1=conn.request("GET",'/sitedb/data/prod/data-processing', headers={"Accept":"*/*"})
2073+
#r1=conn.request("GET",'/sitedb/data/prod/data-processing', headers={"Accept":"*/*"})
2074+
r1=conn.request("GET",'/api/cms/site/query/?json&preset=data-processing', headers={"Accept":"application/json"})
20742075
r2=conn.getresponse()
20752076
r = json.loads(r2.read())['result']
20762077
return r

0 commit comments

Comments
 (0)