(self: Arc<Self>, mut cancel: watch::Receiver<bool>)
| 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(); |
no test coverage detected