You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2019/08/06 15:41:14 UTC
svn commit: r1864525 -
/comdev/reporter.apache.org/trunk/site/wizard/kibble.py
Author: humbedooh
Date: Tue Aug 6 15:41:13 2019
New Revision: 1864525
URL: http://svn.apache.org/viewvc?rev=1864525&view=rev
Log:
make sure we have a file, can read it, and can load it, otherwise regenerate
Modified:
comdev/reporter.apache.org/trunk/site/wizard/kibble.py
Modified: comdev/reporter.apache.org/trunk/site/wizard/kibble.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/kibble.py?rev=1864525&r1=1864524&r2=1864525&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/kibble.py (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/kibble.py Tue Aug 6 15:41:13 2019
@@ -28,9 +28,16 @@ def main():
if not re.match(r"^[-_.a-z0-9]+$", project):
project = "bogus"
cache_file = '/tmp/kibble-cache-%s.json' % project
+ runit = True
if (os.path.exists(cache_file) and os.path.getmtime(cache_file) > (time.time() - 86400)):
output = open(cache_file, "r").read()
- else:
+ try:
+ js = json.loads(output)
+ assert('prs' in js)
+ runit = False
+ except:
+ pass
+ if runit:
# Issues/PRs
issues = requests.post('https://demo.kibble.apache.org/api/issue/issues',
headers = {