Skip to content

Commit

Permalink
Add StoreAwaitedActionDb API
Browse files Browse the repository at this point in the history
This is pre-work for the introducing a distributed redis scheduler. This
is the API for how to interact between the scheduler and the stores.

towards: #359
  • Loading branch information
allada committed Sep 9, 2024
1 parent cbb5835 commit 482fc9f
Show file tree
Hide file tree
Showing 6 changed files with 732 additions and 1 deletion.
1 change: 1 addition & 0 deletions nativelink-scheduler/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rust_library(
"src/memory_awaited_action_db.rs",
"src/platform_property_manager.rs",
"src/property_modifier_scheduler.rs",
"src/store_awaited_action_db.rs",
"src/simple_scheduler.rs",
"src/simple_scheduler_state_manager.rs",
"src/worker.rs",
Expand Down
4 changes: 4 additions & 0 deletions nativelink-scheduler/src/awaited_action_db/awaited_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ impl AwaitedAction {
self.version.0
}

pub(crate) fn set_version(&mut self, version: u64) {
self.version = AwaitedActionVersion(version);
}

pub(crate) fn increment_version(&mut self) {
self.version = AwaitedActionVersion(self.version.0 + 1);
}
Expand Down
1 change: 1 addition & 0 deletions nativelink-scheduler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ pub mod platform_property_manager;
pub mod property_modifier_scheduler;
pub mod simple_scheduler;
mod simple_scheduler_state_manager;
pub mod store_awaited_action_db;
pub mod worker;
pub mod worker_scheduler;
Loading

0 comments on commit 482fc9f

Please sign in to comment.