From df469d01d25fc8fe9be11a070f0aa9882719378d Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Thu, 10 Sep 2015 18:16:29 +0200 Subject: [PATCH] update-github-list: do not compute stats after update they forced configuration duplication, and were redundant anyhow --- TODO | 1 + bin/update-github-list | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index c66485d..46a84f3 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,6 @@ # -*- mode: org -*- +* TODO SQL: rework repo_history/repo_creations to use last_seen * TODO cache dir: split json data from other HTTP info for easier further processing of additional API data diff --git a/bin/update-github-list b/bin/update-github-list index 6263552..6efbeba 100755 --- a/bin/update-github-list +++ b/bin/update-github-list @@ -10,8 +10,17 @@ logfile=$HOME/.cache/ghlister/log/ghlister.$(date +%Y%m%d).log # catchup with recent changes $HOME/src/github-list-repos/bin/ghlister catchup &> $logfile -# compute and store current totals -all_repos=$(echo "select count(*) from repos" | $psql) -fork_repos=$(echo "select count(*) from fork_repos" | $psql) -orig_repos=$(echo "select count(*) from orig_repos" | $psql) -echo "insert into repos_history(repos, fork_repos, orig_repos) values (${all_repos}, ${fork_repos}, ${orig_repos})" | $psql > /dev/null +# XXX: computing the following stats via this script forced to have double +# configuration for shell-vs-python. Also it's unneeded: we can compute the +# same information (number of repos created per day) from the DB, via the +# last_seen column. + +# dbservice=lister-github +# dbconn="service=${dbservice}" +# psql="psql --no-psqlrc --pset t --pset format=unaligned ${dbconn}" + +# # compute and store current totals +# all_repos=$(echo "select count(*) from repos" | $psql) +# fork_repos=$(echo "select count(*) from fork_repos" | $psql) +# orig_repos=$(echo "select count(*) from orig_repos" | $psql) +# echo "insert into repos_history(repos, fork_repos, orig_repos) values (${all_repos}, ${fork_repos}, ${orig_repos})" | $psql > /dev/null