This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Conversation
Contributor
|
We have implemented something very similar https://github.com/laminar-protocol/open-runtime-module-library/blob/master/schedule-update/src/lib.rs |
NikVolf
reviewed
Mar 24, 2020
Member
Author
Very similar indeed. Though it seems yours is more specialised towards working with extrinsics allowing e.g. signed origins to delay a dispatch until later, whereas this is purely for internal APIs. |
marcio-diaz
reviewed
Mar 25, 2020
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
NikVolf
reviewed
Mar 25, 2020
frame/scheduler/src/lib.rs
Outdated
Comment on lines
+184
to
+186
| /// Cancel a periodic dispatch. If called during its dispatch, it will not be dispatched | ||
| /// any further. If called between dispatches, the next dispatch will happen as scheduled but | ||
| /// then it will cease. |
Contributor
There was a problem hiding this comment.
Suggested change
| /// Cancel a periodic dispatch. If called during its dispatch, it will not be dispatched | |
| /// any further. If called between dispatches, the next dispatch will happen as scheduled but | |
| /// then it will cease. | |
| /// Cancel a periodic dispatch. | |
| /// | |
| /// If called during its dispatch, it will not be dispatched | |
| /// any further. If called between dispatches, the next dispatch will happen as scheduled but | |
| /// then it will cease. |
NikVolf
reviewed
Mar 25, 2020
frame/scheduler/src/lib.rs
Outdated
| 1 => { | ||
| Self::schedule(when, priority, call); | ||
| 0 | ||
| } |
NikVolf
reviewed
Mar 25, 2020
frame/scheduler/src/lib.rs
Outdated
| let s = Scheduled { priority, call, maybe_periodic: Some(index) }; | ||
| Agenda::<T>::append_or_insert(when, &[s][..]); | ||
| index | ||
| } |
Contributor
|
but I am not sure if there will be any difference besides aestetic |
marcio-diaz
reviewed
Mar 25, 2020
| type Call: Parameter + Dispatchable<Origin=<Self as Trait>::Origin> + GetDispatchInfo; | ||
|
|
||
| /// The maximum weight that may be scheduled per block for any dispatchables of less priority | ||
| /// than 255. |
Contributor
There was a problem hiding this comment.
Suggested change
| /// than 255. | |
| /// than `HARD_DEADLINE`. |
Member
Author
|
Superseded by #5412 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scheduler to allow for dispatchables to be called in the future without being concerned about using
on_initialize.