MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / reconcile_loop

Method reconcile_loop

crates/openshell-server/src/compute/mod.rs:1024–1034  ·  view source on GitHub ↗
(self: Arc<Self>, mut cancel: watch::Receiver<bool>)

Source from the content-addressed store, hash-verified

1022 }
1023
1024 async fn reconcile_loop(self: Arc<Self>, mut cancel: watch::Receiver<bool>) {
1025 loop {
1026 if let Err(err) = self.reconcile_store_with_backend(ORPHAN_GRACE_PERIOD).await {
1027 warn!(error = %err, "Store reconciliation sweep failed");
1028 }
1029 tokio::select! {
1030 () = tokio::time::sleep(RECONCILE_INTERVAL) => {}
1031 _ = cancel.changed() => return,
1032 }
1033 }
1034 }
1035
1036 async fn reconcile_store_with_backend(&self, grace_period: Duration) -> Result<(), String> {
1037 let sweep_started_at_ms = openshell_core::time::now_ms();

Callers 2

spawn_watchersMethod · 0.80
run_as_holderMethod · 0.80

Calls 1

Tested by

no test coverage detected