In development, it's a bit of a hassle to run the celeryd
as well as the Django development server. Is it possible to, for example, ask celery
to run tasks synchronously during development? Or something similar?
Yes you can. Celery is a generic asynchronous task queue. In place of "django_project" you would point to your module.
This command has used for start the celery beat. Firstly add the django_celery_beat module in installed apps in settings file. And then apply the django migrate command, this will create the tables in admin pannel. After completing all the process like in celery file and create task in tasks.py .
Yes you can do this by setting CELERY_TASK_ALWAYS_EAGER = True
in your settings.
(Constant was previously called CELERY_ALWAYS_EAGER
) http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-execution-settings
There's also a custom Django test runner in django-celery that helps with CELERY_ALWAYS_EAGER. Read more about using Celery with Django on the docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With