Add retry mechanics to `pallet-scheduler` (#3060)
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 <>
Showing
- cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_scheduler.rs 147 additions, 67 deletions...tives/collectives-westend/src/weights/pallet_scheduler.rs
- polkadot/runtime/rococo/src/weights/pallet_scheduler.rs 161 additions, 75 deletionspolkadot/runtime/rococo/src/weights/pallet_scheduler.rs
- polkadot/runtime/westend/src/weights/pallet_scheduler.rs 152 additions, 73 deletionspolkadot/runtime/westend/src/weights/pallet_scheduler.rs
- prdoc/pr_3060.prdoc 15 additions, 0 deletionsprdoc/pr_3060.prdoc
- substrate/frame/scheduler/src/benchmarking.rs 110 additions, 1 deletionsubstrate/frame/scheduler/src/benchmarking.rs
- substrate/frame/scheduler/src/lib.rs 254 additions, 13 deletionssubstrate/frame/scheduler/src/lib.rs
- substrate/frame/scheduler/src/mock.rs 40 additions, 0 deletionssubstrate/frame/scheduler/src/mock.rs
- substrate/frame/scheduler/src/tests.rs 1102 additions, 1 deletionsubstrate/frame/scheduler/src/tests.rs
- substrate/frame/scheduler/src/weights.rs 311 additions, 147 deletionssubstrate/frame/scheduler/src/weights.rs
Please register or sign in to comment