Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
memopol
Commits
b2f2d8ef
Commit
b2f2d8ef
authored
Sep 16, 2016
by
Nicolas Joyard
Browse files
Fix score updating on db update
parent
30583761
Changes
3
Hide whitespace changes
Inline
Side-by-side
.openshift/cron/daily/update_database
View file @
b2f2d8ef
#!/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
bin/lib.sh
View file @
b2f2d8ef
...
...
@@ -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
}
bin/update_votes
View file @
b2f2d8ef
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment