Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
memopol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Political Memory
memopol
Commits
b2f2d8ef
Commit
b2f2d8ef
authored
Sep 16, 2016
by
Nicolas Joyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix score updating on db update
parent
30583761
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
.openshift/cron/daily/update_database
.openshift/cron/daily/update_database
+0
-4
bin/lib.sh
bin/lib.sh
+9
-0
bin/update_votes
bin/update_votes
+5
-0
No files found.
.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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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