mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
hourly traffic: Use instance parameter for timeslice.
Upstart only allows one job/instance combo to run at once. Must parametrize the upstart job so that multiple jobs won't run into each other.
This commit is contained in:
committed by
bsimpson63
parent
9f0e8c65e9
commit
edb32f1cc1
@@ -1,5 +1,7 @@
|
||||
description "process hourly traffic logs on EMR"
|
||||
|
||||
instance $slice
|
||||
|
||||
manual
|
||||
task
|
||||
stop on reddit-stop or runlevel [016]
|
||||
@@ -8,6 +10,5 @@ nice 10
|
||||
|
||||
script
|
||||
. /etc/default/reddit
|
||||
d=`date -u +"%Y-%m-%d-%H" -d '1 hour ago'`
|
||||
wrap-job paster run $REDDIT_INI -c "from r2.lib.traffic import process_hour; process_hour(\"$d\")"
|
||||
wrap-job paster run $REDDIT_INI -c "from r2.lib.traffic import process_hour; process_hour(\"$slice\")"
|
||||
end script
|
||||
|
||||
Reference in New Issue
Block a user