S
S
Sergey Alekseev2019-02-11 09:02:53
Django
Sergey Alekseev, 2019-02-11 09:02:53

Celery-Django, how to run task from django-shell?

How to run a task from a djanga shell?
I do like this:

from core.celery import app
core - ядро приложения settings.py, urls.py, wsgi.py, celery.py
В celery.py создаётся app
Далее пишу:
res = app.download.delay()
и получаю ошибку:
Celery не имеет аттрибута download

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-02-11
@serj2000

> python manage.py shell
> from gendalf.celery_task import yaZadacha
> yaZadacha.delay()

try like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question