Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/statsmaster/templates/process_logs_head.erb

Issue 5667089633247232: Issue 479 - Make AWStats produce daily reports as well (Closed)
Patch Set: Created June 24, 2014, 6:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/statsmaster/templates/process_logs_head.erb
===================================================================
--- a/modules/statsmaster/templates/process_logs_head.erb
+++ b/modules/statsmaster/templates/process_logs_head.erb
@@ -1,3 +1,17 @@
#!/usr/bin/env python
import subprocess
+
+def process_logs(site, databasebreak):
+ datadir = {
+ 'month': '/var/www/awstatsdata',
+ 'day': '/var/www/awstatsdatadaily',
+ }[databasebreak]
+
+ subprocess.check_output([
+ '/usr/lib/cgi-bin/awstats.pl',
+ '-configdir=/var/www/awstatsconf',
+ '-config=%s' % site,
+ '-databasebreak=%s' % databasebreak,
+ '-update'
+ ], env={'AWSTATSDATA': datadir})
« no previous file with comments | « modules/statsmaster/templates/index_item.html.erb ('k') | modules/statsmaster/templates/process_logs_item.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld