ask/django-celery — Issue #94: Problems with celeryd_multi when using a Django settings package
Author: gremmie
Created: 2011-12-12 01:46:28+00:00
State: open

I'm using django-celery, and I have my settings arranged in a package directory. So I typically run management commands like this:

$ python manage.py command --settings=settings.production

If I try to run:

$ python manage.py celeryd_multi start w1 --settings=settings.production

I see this output:

```celeryd-multi v2.4.5
> Starting nodes...
> w1.example.com: Unknown command: 'celeryd_detach'
Type 'manage.py help' for usage.
* Child terminated with failure code 1
FAILED
```

I stepped into the celeryd_multi.py code and I see it try to do a Popen(), but the `--settings=settings.production` argument has already been stripped off by djcelery's `CeleryCommand.handle_default_options`. Since this is now missing, the manage.py command can't find my settings file, it seems, and thus it can't find the djcelery app and thus the unknown command 'celeryd_detach'.

By playing around in the debugger, if I manually add back on `--settings=settings.production` then the Popen() succeeds and everything works.

Should the --settings argument be stripped off?

Thanks.