0

I'm having trouble understanding how to use google cloud tasks to replace celery...

Currently, when you hit endpoint api/v1/longtask celery asyncs the task immediately and returns 200. Task runs, updates, ends.

So with cloud tasks, I would call api/v1/tasks invoke the specific task, and return 200. But the api endpoint api/v1/longtask will timeout now as the task takes 1 hour.

So do I need to adjust the timeout on the endpoint.

At this point I think a better solution is cloud functions but I would like to learn what the other side of the task looks like as the documentation only shows calling a URL. It never shows the long task api endpoint which in my experience times out at 60 seconds.

Thank you,

Denis
  • 570
  • 9
  • 23
  • Can you precise which product create the task? What your task call (a url I guess)? On which product is hosted the URL called by the task? – guillaume blaquiere Oct 20 '21 at 18:04
  • Right now the task is created with Google Cloud Tasks API when the endpoint `api/v1/tasks/my-task` is called. The url is then `api/v1/longtask`. After testing this and removing celery, it seems the timeout was set from the client, and so the flask app won't timeout... I'm still adjusting some settings and can report back with more information. – Denis Oct 20 '21 at 18:18

0 Answers0