community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From he...@apache.org
Subject svn commit: r1822257 - /comdev/reporter.apache.org/trunk/site/getjson.py
Date Fri, 26 Jan 2018 09:06:16 GMT
Author: henkp
Date: Fri Jan 26 09:06:16 2018
New Revision: 1822257

URL: http://svn.apache.org/viewvc?rev=1822257&view=rev
Log:
get checker_json on the fly ; use cache as fallback

Modified:
    comdev/reporter.apache.org/trunk/site/getjson.py

Modified: comdev/reporter.apache.org/trunk/site/getjson.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/getjson.py?rev=1822257&r1=1822256&r2=1822257&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/getjson.py (original)
+++ comdev/reporter.apache.org/trunk/site/getjson.py Fri Jan 26 09:06:16 2018
@@ -273,7 +273,15 @@ if re.match(r"^[-a-zA-Z0-9_.]+$", user):
     keys = {}
     count = {}
     health = {}
-    checker_json = readJson(RAOHOME+"data/cache/checker.json", None)
+    checker_json = None
+    # fetch checker_json from checker.apache.org ; use cache as fallback
+    try:
+        request  = urllib2.Request("https://checker.apache.org/json/", None)
+        response = urllib2.urlopen(request, timeout=1)
+        content  = response.read()
+        checker_json = json.loads(content)
+    except:
+        checker_json = readJson(RAOHOME+"data/cache/checker.json", None)
     checker = {}
     for group in groups:
         jiras = []



Mime
View raw message