Skip to content
Advertisement

Create celery tasks then run synchronously

My app gathers a bunch of phone numbers on a page. Once the user hits the submit button I create a celery task to call each number and give a reminder message then redirect them to a page where they can see the live updates about the call. I am using web sockets to live update the status of each call and need the tasks to execute synchronously as I only have access to dial out from one number.

So once the first call/task is completed, I want the next one to fire off.

I took a look at CELERY_ALWAYS_EAGER settings but it just went through the first iteration and stopped.

JavaScript

Advertisement

Answer

if you want to fire each call one after another, why dont you wrap all the calls in one task

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement