I'm looking for a resource, documentation or advise on how to test django celery on my windows machine before deploying on a Linux based server.
Any useful Answer would be appreciated and accepted.
Celery (since version 4 as pointed out by another answer) does not support Windows (source: http://docs.celeryproject.org/en/latest/faq.html#does-celery-support-windows). Even so, you have some options:
1) Use task_always_eager=True
. This will run your tasks synchronously – with this, you can verify that your code is doing what it's supposed to do. Running tasks synchronously works even on Windows.
More info: http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-task_always_eager
2) Use WSL (Windows Subsystem for Linux).
More info: https://learn.microsoft.com/en-us/windows/wsl/install-win10#install-the-windows-subsystem-for-linux
3) Use Docker for Windows. You can run Celery Worker(s) and Celery Beat inside the container.
More info: https://docs.docker.com/docker-for-windows/
Personally, I use option 1) for unit testing and option 2) for development.
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