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

System tasks #940

Closed
wants to merge 5 commits into from
Closed

System tasks #940

wants to merge 5 commits into from

Conversation

4meta5
Copy link
Contributor

@4meta5 4meta5 commented Jun 17, 2024

WIP Closes #936

  • add SystemTasks priority queue separate from existing Tasks storage item
  • replace pallet_tasks::Tasks::<T>:: invocations with try SystemTasks first and, if None, then Tasks
  • prioritize system tasks
  • impl approval
  • testing

@4meta5 4meta5 added bug Something isn't working enhancement New feature or request priority: high labels Jun 17, 2024
@4meta5 4meta5 self-assigned this Jun 17, 2024
@4meta5 4meta5 requested a review from dvc94ch June 17, 2024 23:25
@4meta5 4meta5 mentioned this pull request Jun 17, 2024
3 tasks
@4meta5
Copy link
Contributor Author

4meta5 commented Jun 17, 2024

#941 includes an alternative design that splits UnassignedTasks instead of Tasks like this PR

#[pallet::storage]
#[pallet::getter(fn system_tasks)]
pub type SystemTasks<T: Config> =
StorageMap<_, Blake2_128Concat, TaskId, TaskDescriptor, OptionQuery>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why store the task descriptor here? All you need is an UnassignedSystemTasks queue and chain the iterators when assigning tasks

@4meta5
Copy link
Contributor Author

4meta5 commented Jun 18, 2024

indeed David preferred #941 so working on that approach instead

@4meta5 4meta5 closed this Jun 18, 2024
@4meta5 4meta5 deleted the amar-system-tasks-prioritization branch June 18, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request priority: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prioritize System tasks
2 participants