Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Fix celery start script
Browse files Browse the repository at this point in the history
- allow to change config path
- fix bash variables (commands start/stop were always executed)

Change-Id: I0a9a37cf296a2fc88cf4eefd58966206cdeee2b1
  • Loading branch information
loles committed Jan 21, 2016
1 parent 065873b commit c80a0d4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions utils/solar-celery
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@
# Default-Stop: 0 1 6
### END INIT INFO

export SOLAR_CONFIG_OVERRIDE=/.solar_config_override
START="$(/usr/bin/env celery multi start 2 -A solar.orchestration.runner -P gevent -c:1 1 -c:2 1000 -Q:1 scheduler,system_log -Q:2 celery --pidfile=/var/run/celery/%N.pid --logfile=/var/run/celery/%N.log)"
STOP="$(/usr/bin/env celery multi stopwait 2 --pidfile=/var/run/celery/%N.pid)"
export SOLAR_CONFIG_OVERRIDE=${SOLAR_CONFIG_OVERRIDE:-/.solar_config_override}
NAME=solar-celery


case "$1" in
start)
"{$START}"
/usr/bin/env celery multi start 2 -A solar.orchestration.runner -P gevent -c:1 1 -c:2 1000 -Q:1 scheduler,system_log -Q:2 celery --pidfile=/var/run/celery/%N.pid --logfile=/var/run/celery/%N.log
;;
stop)
"{$STOP}"
/usr/bin/env celery multi stopwait 2 --pidfile=/var/run/celery/%N.pid
;;
restart|force-reload)
${0} stop
Expand Down

0 comments on commit c80a0d4

Please sign in to comment.