pawamoy/django-suit-dashboard

Celery Not starting with Project having django.contrib.admin.apps.SimpleAdminConfig........

Closed this issue · 3 comments

Hi,

I am working on a project, its having celery & django-suit-dashboard both......

Django-Suit is working fine....but after i replace 'django.contrib.admin' by 'django.contrib.admin.apps.SimpleAdminConfig' in settings.py.

Please help if there is any workaround for Celery or Django-suit-dashboard. so that they both can work together.

celery start traceback below::

(MY_PROJECT) [root@devbox myproject]# python manage.py celeryd
/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/djcelery/management/base.py:82: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
return super(CeleryCommand, self).run_from_argv(argv)
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/django/core/management/init.py", line 353, in execute_from_command_line
utility.execute()
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/django/core/management/init.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/djcelery/management/base.py", line 82, in run_from_argv
return super(CeleryCommand, self).run_from_argv(argv)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/djcelery/management/base.py", line 75, in execute
super(CeleryCommand, self).execute(*args, **options)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/djcelery/management/commands/celeryd.py", line 25, in handle
worker.run(**options)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/bin/worker.py", line 212, in run
state_db=self.node_format(state_db, hostname), **kwargs
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/worker/init.py", line 95, in init
self.app.loader.init_worker()
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/loaders/base.py", line 126, in init_worker
self.import_default_modules()
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/loaders/base.py", line 114, in import_default_modules
signals.import_modules.send(sender=self.app)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/utils/dispatch/signal.py", line 166, in send
response = receiver(signal=self, sender=sender, **named)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/amqp/utils.py", line 42, in call
self.set_error_state(exc)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/amqp/utils.py", line 39, in call
**dict(self.kwargs, **kwargs) if self.kwargs else kwargs
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/app/base.py", line 329, in _autodiscover_tasks
self.loader.autodiscover_tasks(packages, related_name)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/loaders/base.py", line 249, in autodiscover_tasks
related_name) if mod)
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/loaders/base.py", line 270, in autodiscover_tasks
return [find_related_module(pkg, related_name) for pkg in packages]
File "/PROJECTS/MY_PROJECT/lib/python2.7/site-packages/celery/loaders/base.py", line 282, in find_related_module
pkg_path = importlib.import_module(package).path
File "/usr/lib64/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named SimpleAdminConfig
(MY_PROJECT) [root@devbox myproject]#

Hi,

What is your Django version?

Hi,

My Django version is 1.9.10.....

I never used celery so I don't know how it works.
Could you provide me with a template project to reproduce the issue? Or the steps you went through to configure your project with celery? I tried python manage.py celeryd but it didn't find the command. Where does this command come from?