refactor: Interpret score with a provided method on Score (#100)

First step in a direction to better orchestrate the core flow, even though it feels weird to move this logic into the `Score`. We'll refactor this as soon as we have a better solution.

Co-authored-by: Ian Letourneau <letourneau.ian@gmail.com>
Reviewed-on: NationTech/harmony#100
This commit is contained in:
2025-08-09 22:56:23 +00:00
parent dcf8335240
commit 29a261575b
23 changed files with 118 additions and 78 deletions

View File

@@ -57,8 +57,7 @@ impl<
namespace: namespace.clone(),
host: "localhost".to_string(),
};
ntfy.create_interpret()
.execute(&Inventory::empty(), topology)
ntfy.interpret(&Inventory::empty(), topology)
.await
.expect("couldn't create interpret for ntfy");
@@ -95,8 +94,7 @@ impl<
alerting_score.receivers.push(Box::new(ntfy_receiver));
alerting_score
.create_interpret()
.execute(&Inventory::empty(), topology)
.interpret(&Inventory::empty(), topology)
.await
.unwrap();
Ok(())