Commit b2f2d8ef authored by Nicolas Joyard's avatar Nicolas Joyard

Fix score updating on db update

parent 30583761
#!/bin/bash
set -x
cmd=$1
cd $OPENSHIFT_REPO_DIR
export CLEAN=1
nohup bin/update_all > $OPENSHIFT_LOG_DIR/update_all.log 2>&1 &
./manage.py refresh_scores
......@@ -35,3 +35,12 @@ function francedata_download_pipe() {
gunzip -c ${OPENSHIFT_DATA_DIR}$1 | $2
[ -n "$CLEAN" ] && rm -rf $1
}
function refresh_scores() {
if [ -n "$OPENSHIFT_REPO_DIR" ]; then
cd $OPENSHIFT_REPO_DIR
fi
export DJANGO_SETTINGS_MODULE=memopol.settings
./manage.py refresh_scores
}
......@@ -8,3 +8,8 @@ parltrack_download_pipe ep_votes.json.xz parltrack_import_votes
sleep 10
francedata_download_pipe votes.json.gz francedata_import_votes
if [ "x$1" != "xnoscores" ]; then
sleep 10
refresh_scores
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment