From: Benjamin Mako Hill Date: Thu, 2 Apr 2020 17:48:19 +0000 (-0500) Subject: updated to just write a single log file for each day X-Git-Url: https://code.communitydata.science/covid19.git/commitdiff_plain/3d0d4eee76ac828d8551134cbbc0e38a50998bde?ds=sidebyside updated to just write a single log file for each day --- diff --git a/cron-wikipedia_revisions.sh b/cron-wikipedia_revisions.sh index a53bc3f..5ba02ed 100644 --- a/cron-wikipedia_revisions.sh +++ b/cron-wikipedia_revisions.sh @@ -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" diff --git a/cron-wikipedia_views.sh b/cron-wikipedia_views.sh index 3611657..4b39caa 100644 --- a/cron-wikipedia_views.sh +++ b/cron-wikipedia_views.sh @@ -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/