0

I'm using Django 1.6 and Celery 3.1 (so not using django-celery). My WSGI file looks like this:

import os
import sys

path = '/code_base/backend/'
if path not in sys.path:
    sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'my_django_project.settings.production'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Starting the Apache server everything works as expected as if I was running manage.py runserver. This is fine for my webserver, but what configuration do I need when I want the server to be a worker instead (similar to celery -A my_django_project worker -l info)?

emillamm
  • 139
  • 1
  • 6
  • [yellowcaps answer](http://stackoverflow.com/questions/14761468/how-do-you-run-a-worker-with-aws-elastic-beanstalk) actually turned out to be the best solution for me – emillamm Mar 13 '15 at 16:56

1 Answers1

2

Usually in production you would want to run the worker as a daemon. There are a few ways to achieve that, documented in the Celery Guide, but personally I prefer to run the workers under supervisord.

Chris Ward
  • 774
  • 5
  • 6