forked from NationTech/harmony
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:
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user