Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR/MainProcess] Received unregistered task of type 'djcelery_email_send_multiple'. #22

Closed
EmadMokhtar opened this issue Sep 7, 2015 · 1 comment

Comments

@EmadMokhtar
Copy link

I'm trying to use the app to send emails but I'm always facing an error.

These are the packages in my environment:

Django==1.8.3
amqp==1.4.6
anyjson==0.3.3
billiard==3.3.0.20
celery==3.1.18
django-appconf==1.0.1
django-celery==3.1.16
django-celery-email==1.1.2
django-jfu==2.0.9
kombu==3.0.26
psycopg2==2.6.1
pytz==2015.4
six==1.9.0
wsgiref==0.1.2

settings.py

**
INSTALLED_APPS = (
    ***
    'djcelery',
    'kombu.transport.django',
    'djcelery_email',
    ***
)
**

CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'

CELERY_IMPORTS = ["djcelery_email.tasks"]

celery.py

from __future__ import absolute_import
from celery import Celery

app = Celery('job_costing',
             broker='django://')

if __name__ == '__main__':
    app.start()

init.py

from __future__ import absolute_import

# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
@EmadMokhtar
Copy link
Author

I added autodiscover_tasks to celery.py and it's working.

celery.py

from __future__ import absolute_import
from celery import Celery
from django.conf import settings

app = Celery('job_costing',
             broker=settings.CELERY_BROKER_URL)
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(settings.INSTALLED_APPS)

if __name__ == '__main__':
    app.start()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant