Given the current task ID, is it possible to reschedule the current task? #743
|
So, I want to handle retries myself instead of leveraging it to the automatic retry system of apalis. I'm using the postgres backend. How would you approach this? My goal would be: Fetch the current task ID, then if an error occur, use this task ID to somehow reschedule the current task. |
Answered by
geofmureithi
May 6, 2026
Replies: 1 comment 5 replies
|
You should be able to write your own retry policy eg: https://docs.rs/apalis/1.0.0-rc.8/src/apalis/layers/retry/mod.rs.html#267-299 Then you can pass it to the .retry method: https://docs.rs/apalis/1.0.0-rc.8/apalis/layers/retry/#example-worker-with-retry-policy |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are using postgres, you can use an sql query:
This is the ack query, you can use something similar