Skip to content

Instantly share code, notes, and snippets.

@trAve3113r
Last active April 25, 2018 19:59
Show Gist options
  • Save trAve3113r/028b919eb36521a3a222f65dcbfb6e64 to your computer and use it in GitHub Desktop.
Save trAve3113r/028b919eb36521a3a222f65dcbfb6e64 to your computer and use it in GitHub Desktop.
# create this in etc/supervisor/conf.d/task_manager.conf
[program:task_manager]
command=bash -c "echo starting main.huey && sleep $(( $RANDOM / 2500 + 4)) && exec huey_consumer.py main.huey"
environment=PYTHONPATH=%(here)s/..
numprocs=1
process_name=%(program_name)s-%(process_num)d
stopwaitsecs=5
stdout_logfile=%(here)s/huey.log
redirect_stderr=true
# Daemonizig the command:
# supervisorctl reread
# supervisorctl update
# Also see:
# http://nanvel.name/2013/08/huey-celery-alteranive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment