I use Django and Django Rest Framework for my internal API and I use Vue.js for my frontend. The backend (API) and the frontend are totally separated.
I need to run a background task (every time a user is created) and I am considering 2 solutions:
- Call (with a post_save signal) a function that runs the task.
Note that this function will call a 3rd party API. The call might fail for various reasons and/or run during a long period ~20sec.
- Create a background task
With Redis or RabbitMQ or django-background-tasks.
Which solution should I go for ? If both solutions are acceptable, what would be the limitations/advantages of each one ?