MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / spawn_alert_eval_loop

Function spawn_alert_eval_loop

nodedb/src/event/alert/executor.rs:33–41  ·  view source on GitHub ↗

Spawn the alert evaluation loop as a background Tokio task.

(
    shared_state: Arc<SharedState>,
    registry: Arc<AlertRegistry>,
    shutdown: watch::Receiver<bool>,
)

Source from the content-addressed store, hash-verified

31
32/// Spawn the alert evaluation loop as a background Tokio task.
33pub 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
43async fn alert_eval_loop(
44 state: Arc<SharedState>,

Callers 1

spawnMethod · 0.85

Calls 2

alert_eval_loopFunction · 0.85
spawnFunction · 0.50

Tested by

no test coverage detected