-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheduler: Retry a Task on a Call Failure #3014
Comments
Wouldn't it make more sense that you just schedule some call that can handle the failing payout and knows if it needs to be rescheduled or not? It could for example try to swap less or similar? |
There is the Tasks API now, maybe you can use that instead of the scheduler? #1343 |
@bkchr yes, that would at least provide a better api for a user. but more work to do. probably some extension pallet for treasury pallet, to check payout result and extension pallet for asset-conversion, to check and retry swaps. for a quick win, I would try to solve it with the scheduler, if the proposed solution for retries looks good and has not concerns. then, the retries looks to me as a good feature for the scheduler. in the existing swap api, we already can set
if I understand it right, to utilize tasks, we need some extension pallet for asset conversion. because we cannot set some general task with an extrinsic. if you think we should go with the extension pallet solution, I can explore it more. and I will need @joepetrowski help, to propiritize it. |
@georgepisaltu is working on adding retires to the scheduler here: #3060 |
yes, I'seen, but still wanna have some alignment on the solution. |
@muharem A task is essentially just an extrinsic that accepts a certain set of inputs based on a validation criterion. Any task added to the runtime can be triggered via |
Fixes #3014 This PR adds retry mechanics to `pallet-scheduler`, as described in the issue above. Users can now set a retry configuration for a task so that, in case its scheduled run fails, it will be retried after a number of blocks, for a specified number of times or until it succeeds. If a retried task runs successfully before running out of retries, its remaining retry counter will be reset to the initial value. If a retried task runs out of retries, it will be removed from the schedule. Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. Periodic tasks will have their periodic schedule put on hold while the task is retrying. --------- Signed-off-by: georgepisaltu <george.pisaltu@parity.io> Co-authored-by: command-bot <>
Fixes paritytech#3014 This PR adds retry mechanics to `pallet-scheduler`, as described in the issue above. Users can now set a retry configuration for a task so that, in case its scheduled run fails, it will be retried after a number of blocks, for a specified number of times or until it succeeds. If a retried task runs successfully before running out of retries, its remaining retry counter will be reset to the initial value. If a retried task runs out of retries, it will be removed from the schedule. Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. Periodic tasks will have their periodic schedule put on hold while the task is retrying. --------- Signed-off-by: georgepisaltu <george.pisaltu@parity.io> Co-authored-by: command-bot <>
Problem
The scheduler pallet, utilized for setting and execution delayed tasks/calls, currently abandons the task upon it's call failure. In specific situations (refer to the use case: PR, place in code), there is a requirement to implement tasks retries within a specified time period.
Possible Solution
Introduce optional retry setting for a task:
The text was updated successfully, but these errors were encountered: