Skip to content
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

[feature] schedule call lifecycle with suspend/resume/fail-safe #23

Open
extraymond opened this issue Jul 1, 2022 · 0 comments
Open
Labels

Comments

@extraymond
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant