Retry failed tasks based on API availability #154
Replies: 1 comment
-
You can always enqueue the tasks but you can turn off the queue and turn on the queue programmatically using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings,
I am currently trying to implement a task queueing system for one of my services. Rqueue seemed like the best option but I can't seem to get around this very specific scenario.
One of tasks that I am enqueuing retrieves data from an API before updating some value in a database. The problem for me though, is that this API has a very bad uptime and more often than not, the task is failing each retry as it fails to reach the API.
I want to retry these failed tasks at a later time based on this API availability (basically make a connection check, and if it passes, trigger the jobs again). Maybe a cron job that makes a connection test to the API each hour before triggering the failed queues would work, but how exactly would I trigger the tasks in the failed queues programmatically?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions