From 46afe8b1e4f61292cbee48136c91c9a903e3ee46 Mon Sep 17 00:00:00 2001 From: yenicelik Date: Sun, 21 May 2023 17:13:15 -0400 Subject: [PATCH] influxdb query also groups by archive_needed now --- web3_proxy/src/stats/influxdb_queries.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web3_proxy/src/stats/influxdb_queries.rs b/web3_proxy/src/stats/influxdb_queries.rs index 0d75881c..eb4a56b8 100644 --- a/web3_proxy/src/stats/influxdb_queries.rs +++ b/web3_proxy/src/stats/influxdb_queries.rs @@ -423,14 +423,20 @@ pub async fn query_user_stats<'a>( } } else if key == "archive_needed" { match value { - influxdb2_structmap::value::Value::Long(inner) => { + influxdb2_structmap::value::Value::String(inner) => { out.insert( "archive_needed".to_owned(), - serde_json::Value::Number(inner.into()), + if inner == "true" { + serde_json::Value::Bool(true) + } else if inner == "false" { + serde_json::Value::Bool(false) + } else { + serde_json::Value::String("error".to_owned()) + }, ); } _ => { - error!("archive_needed should always be a Long!"); + error!("archive_needed should always be a String!"); } } } else if key == "error_response" {