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:
Ricky Ramirez
2013-01-11 13:28:02 -08:00
committed by bsimpson63
parent 9f0e8c65e9
commit edb32f1cc1

View File

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