]> code.communitydata.science - covid19.git/commitdiff
updated to just write a single log file for each day
authorBenjamin Mako Hill <mako@atdot.cc>
Thu, 2 Apr 2020 17:48:19 +0000 (12:48 -0500)
committerBenjamin Mako Hill <mako@atdot.cc>
Thu, 2 Apr 2020 17:48:19 +0000 (12:48 -0500)
cron-wikipedia_revisions.sh
cron-wikipedia_views.sh

index a53bc3f7009a6779c20fe86b4e55fb6d407d608b..5ba02ed43d92212c9124542b37c32a7362f1c099 100644 (file)
@@ -3,10 +3,10 @@
 TZ="UTC"
 date_string=$(date +%Y%m%d)
 
-./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/enwp-wikiproject_scraper-${date_string}.log)
-
 revs_log="enwp-revisions-${date_string}.log"
-./wikipedia/scripts/fetch_enwiki_revisions.py 2> >(tee wikipedia/logs/${rev_log})
+./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/${revs_log})
+
+./wikipedia/scripts/fetch_enwiki_revisions.py 2> >(tee -a wikipedia/logs/${revs_log})
 mv wikipedia/logs/${revs_log} /var/www/covid19/wikipedia/logs/
 
 revs_tsv="digobs_covid19-wikipedia-enwiki_revisions-${date_string}.tsv"
index 361165729831f34f9e458573a0039575099d3f94..4b39caab30117cab45941f89fd9c563b60934625 100644 (file)
@@ -3,11 +3,11 @@
 TZ="UTC"
 date_string=$(date +%Y%m%d)
 
-./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/enwp-wikiproject_scraper-${date_string}.log)
+view_log="enwp-daily_views-${date_string}.log"
+./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/{$view_log})
 
 # get the list of files
-view_log="enwp-daily_views-${date_string}.log"
-./wikipedia/scripts/fetch_enwiki_daily_views.py 2> >(tee wikipedia/logs/${view_log})
+./wikipedia/scripts/fetch_enwiki_daily_views.py 2> >(tee -a wikipedia/logs/${view_log})
 mv wikipedia/logs/${view_log} /var/www/covid19/wikipedia/logs/${view_log}
 mv wikipedia/data/digobs_covid19-wikipedia-enwiki_dailyviews-${date_string}.tsv /var/www/covid19/wikipedia/
 

Community Data Science Collective || Want to submit a patch?