Skip to content

Commit

Permalink
fix: fix typo in tx status mapping (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Nov 9, 2024
1 parent 491edfa commit 325b574
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ impl K8sContext {
),
};
}

let default = HydraDoomNodeStatus::offline(crd, &self.config, &self.constants);

match reqwest::get(&url).await {
Expand All @@ -325,11 +326,12 @@ impl K8sContext {
.clone()
.samples
.into_iter()
.find(|sample| sample.metric == self.constants.state_metric)
.find(|sample| sample.metric == self.constants.transactions_metric)
.map(|sample| match sample.value {
prometheus_parse::Value::Counter(count) => count.round() as i64,
_ => 0,
});

match (state, transactions) {
(Some(state), Some(transactions)) => HydraDoomNodeStatus {
transactions,
Expand Down

0 comments on commit 325b574

Please sign in to comment.