[feature] schedule call lifecycle with suspend/resume/fail-safe
Opened this issue · 0 comments
extraymond commented
Info
description:
If the initial deposit was not enough to carry out the actual call, then we could suspend the call and delay it for some time before cancelling it. Before final cancellation the caller could top-up the initial deposit and thus resume the call.
expected results:
- create an lifecycle for scheduled call, includes on_creation, on_first_try, on_retry, on_suspend, on_resume, on_failed
- on_creation will need the caller to deposit an amount
- on_first_try will refund the non needed deposit back to the caller
- on_retry can be extended with some alt execution, where we can specify a MAX::retry or alt_deposit
- on_suspend will be called when exceeds MAX::retry
- on_resume will put the call back into the scheduler queue, with some accepted delay, if the delay was not possible then failed it
- on_failed allow the the chain to help the failed call to specify some retreat strategy, for example to unlock the reserved funds for the caller