update-github-list: do not compute stats after update

they forced configuration duplication, and were redundant anyhow
This commit is contained in:
Stefano Zacchiroli 2015-09-10 18:16:29 +02:00
parent fca6397cdf
commit df469d01d2
2 changed files with 15 additions and 5 deletions

1
TODO
View file

@ -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

View file

@ -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