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/11/03 01:12:03 UTC
svn commit: r1712189 - in /comdev/reporter.apache.org/trunk: README.txt
data/bugzillastats.py scripts/bugzillastats.py
Author: sebb
Date: Tue Nov 3 00:12:02 2015
New Revision: 1712189
URL: http://svn.apache.org/viewvc?rev=1712189&view=rev
Log:
Moved to scripts
Added:
comdev/reporter.apache.org/trunk/scripts/bugzillastats.py
- copied, changed from r1711360, comdev/reporter.apache.org/trunk/data/bugzillastats.py
Removed:
comdev/reporter.apache.org/trunk/data/bugzillastats.py
Modified:
comdev/reporter.apache.org/trunk/README.txt
Modified: comdev/reporter.apache.org/trunk/README.txt
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/README.txt?rev=1712189&r1=1712188&r2=1712189&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/README.txt (original)
+++ comdev/reporter.apache.org/trunk/README.txt Tue Nov 3 00:12:02 2015
@@ -36,9 +36,9 @@ crontab -l -u root (in puppet, part of p
crontab -l -u www-data:
# m h dom mon dow command
00 4,12,20 * * * cd /var/www/reporter.apache.org/data && ./python3logger.sh parsepmcs.py
-10 00 * * * cd /var/www/reporter.apache.org/data && ./python3logger.sh reportingcycles.py
+10 00 * * * cd /var/www/reporter.apache.org/scripts && ./python3logger.sh reportingcycles.py
20 00 * * * cd /var/www/reporter.apache.org/data && ./python3logger.sh pmcdates.py
-30 00 * * * cd /var/www/reporter.apache.org/data && ./python3logger.sh bugzillastats.py
+30 00 * * * cd /var/www/reporter.apache.org/scripts && ./python3logger.sh bugzillastats.py
# ensure that any new data files get picked up by the commit (which must be done by root)
# TODO: either discard the output or work out how to log it (with timestamps) if there is any output
Copied: comdev/reporter.apache.org/trunk/scripts/bugzillastats.py (from r1711360, comdev/reporter.apache.org/trunk/data/bugzillastats.py)
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/bugzillastats.py?p2=comdev/reporter.apache.org/trunk/scripts/bugzillastats.py&p1=comdev/reporter.apache.org/trunk/data/bugzillastats.py&r1=1711360&r2=1712189&rev=1712189&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/data/bugzillastats.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/bugzillastats.py Tue Nov 3 00:12:02 2015
@@ -20,6 +20,8 @@ BASE = "https://bz.apache.org/bugzilla/r
CREATED = "&f1=creation_ts&o1=greaterthaneq&v1=-3m"
RESOLVED = "&chfield=bug_status&chfieldvalue=RESOLVED&chfieldfrom=-3m&chfieldto=Now"
+__BUGZILLA_STATS = "../data/bugzillastats.json"
+
def getCSV(url):
csv = {}
with urllib.request.urlopen(url) as f:
@@ -79,8 +81,8 @@ for product in created:
for product in resolved:
addCount(product, 1, resolved[product])
-print("Writing bugzillastats.json")
-with open("bugzillastats.json","w") as f:
+print("Writing " + __BUGZILLA_STATS)
+with open(__BUGZILLA_STATS,"w") as f:
json.dump(stats, f, indent=1, sort_keys=True)
f.close()
print("All done")
\ No newline at end of file