Django background tasks with 'threading' module.
Django background tasks with threading
module.
NOTE: No need celery anymore for single-time-run background tasks
Documentation: https://ozcanyarimdunya.github.io/dj_threading/
We created a django model when user starts a task and this model’s id
sent to long running task as argument.
We can get/change/save model in this task. During this time we can
access this model on any django view.
So with this we can set custom status on model in task and access them
in anywhere at anytime.
Install the requirements
make install
Make database migrations
make migrations
Run the server and open a browser then navigate to http://localhost:8000
make start
Run below command and open a browser then navigate to
http://localhost:8000
make docker