#Celery task for ml api

description "Celery ML api"
author "Vik Paruchuri <vik@edx.org>"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 3 30

env DJANGO_SETTINGS_MODULE={{ discern_settings }}

chdir {{ discern_code_dir }}
setuid {{ discern_user }}

exec {{ discern_venv_dir }}/bin/python {{ discern_code_dir }}/manage.py celeryd --loglevel=info --settings={{ discern_settings }} --pythonpath={{ discern_code_dir }} -B --autoscale={{ ansible_processor_cores * 2 }},1
