You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2015/10/09 02:02:59 UTC

svn commit: r1707637 - /comdev/reporter.apache.org/trunk/site/getjson.py

Author: sebb
Date: Fri Oct  9 00:02:59 2015
New Revision: 1707637

URL: http://svn.apache.org/viewvc?rev=1707637&view=rev
Log:
Don't create a dummy JIRA.json file if the query fails

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=1707637&r1=1707636&r2=1707637&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/getjson.py (original)
+++ comdev/reporter.apache.org/trunk/site/getjson.py Fri Oct  9 00:02:59 2015
@@ -165,9 +165,13 @@ def getJIRAS(project):
                 f.close()
             return cdata['total'], rdata['total'], project
         except Exception as err:
-            with open("/var/www/reporter.apache.org/data/JIRA/%s.json" % project, "w") as f:
-                json.dump([0,0,None], f, indent=1)
-                f.close()
+            # Don't create an empty file if the request fails. The likely cause is that the project does not use JIRA,
+            # or getjson has been invoked with an invalid pmc name. Invalid files will cause the refresh script to
+            # retry the requests unnecessarily. 
+            # Furthermore, if there is a temporary issue, creating an empty file will prevent a retry for 48hours.
+#             with open("/var/www/reporter.apache.org/data/JIRA/%s.json" % project, "w") as f:
+#                 json.dump([0,0,None], f, indent=1)
+#                 f.close()
             return 0,0, None
 
 def getProjectData(project):