Spawn the alert evaluation loop as a background Tokio task.
(
shared_state: Arc<SharedState>,
registry: Arc<AlertRegistry>,
shutdown: watch::Receiver<bool>,
)
| 31 | |
| 32 | /// Spawn the alert evaluation loop as a background Tokio task. |
| 33 | pub fn spawn_alert_eval_loop( |
| 34 | shared_state: Arc<SharedState>, |
| 35 | registry: Arc<AlertRegistry>, |
| 36 | shutdown: watch::Receiver<bool>, |
| 37 | ) -> tokio::task::JoinHandle<()> { |
| 38 | tokio::spawn(async move { |
| 39 | alert_eval_loop(shared_state, registry, shutdown).await; |
| 40 | }) |
| 41 | } |
| 42 | |
| 43 | async fn alert_eval_loop( |
| 44 | state: Arc<SharedState>, |
no test coverage detected