[Answer]-Demonized Celery for django project

1đź‘Ť

âś…

Finally My boss got the bandwidth to sit with me, and he found the exact problem.

And the problem was relative imports…

I just needed to append “project.” for every project related import for all the imports in tasks.py and in all the imports in imported files too.
e.g

tasks.py  
from celeryapp.celeryqueue import app # replaced by  
from project.celeryapp.celeryqueue import app  # and  

from abc import xyz  # is replced by  
from project.abc import xyz  

xyz.py  
from pqr import stu # is replced by
from project.pqr import stu  

and so on…

Here is the link as daniula suggested relative imports

👤Kishor Pawar

0đź‘Ť

Can you add “–loglevel=DEBUG” to configs:

# Extra arguments to celeryd
CELERYD_OPTS="--time-limit=300 --concurrency=8 --loglevel=DEBUG"

Check the log files and edit your question with whatever unusual you see there.
The problem you described can be due to many reasons.

👤rohan

Leave a comment