From dac091d48f36eb7aa9d6a2670e0eac112ba91b43 Mon Sep 17 00:00:00 2001 From: 4t145 Date: Thu, 26 Dec 2024 15:58:21 +0800 Subject: [PATCH] update mq reversion --- Cargo.toml | 4 ++-- backend/spi/spi-log/src/serv/pgv2/log_pg_item_serv.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 289a4d4a..2c210dcc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,9 +67,9 @@ strum = { version = "0.26", features = ["derive"] } # tardis = { version = "0.2.0", path = "../tardis/tardis" } tardis = { git = "https://github.com/ideal-world/tardis.git", rev = "66d4c63" } # asteroid-mq = { git = "https://github.com/4t145/asteroid-mq.git", rev = "d59c64d" } -asteroid-mq = { git = "https://github.com/4t145/asteroid-mq.git", rev = "312b0f3f76fb75081a47a87770e14b9a29a72f6b" } +asteroid-mq = { git = "https://github.com/4t145/asteroid-mq.git", rev = "f9c96f3" } # asteroid-mq = { version = "0.1.0-alpha.5" } -asteroid-mq-sdk = { git = "https://github.com/4t145/asteroid-mq.git", rev = "312b0f3f76fb75081a47a87770e14b9a29a72f6b" } +asteroid-mq-sdk = { git = "https://github.com/4t145/asteroid-mq.git", rev = "f9c96f3" } # asteroid-mq-sdk = { version = "0.1.0-alpha.5" } #spacegate diff --git a/backend/spi/spi-log/src/serv/pgv2/log_pg_item_serv.rs b/backend/spi/spi-log/src/serv/pgv2/log_pg_item_serv.rs index d464225d..7b566485 100644 --- a/backend/spi/spi-log/src/serv/pgv2/log_pg_item_serv.rs +++ b/backend/spi/spi-log/src/serv/pgv2/log_pg_item_serv.rs @@ -769,11 +769,11 @@ async fn push_to_eda(req: &LogItemAddV2Req, ref_fields: &Vec, funs: &Tar // if the op is deleted or log disabled, send the delete event to stats if (req_clone.op.as_ref().map_or(false, |op| op.to_lowercase() == "delete")) || req_clone.disable.unwrap_or(false) { let stats_delete: StatsItemDeleteReq = req_clone.into(); - topic.send_event(stats_delete.inject_context(funs, ctx).json()).map_err(mq_error).await?; + topic.send_event_and_wait(stats_delete.inject_context(funs, ctx).json()).map_err(mq_error).await?; return Ok(()); } let stats_add: StatsItemAddReq = req_clone.into(); - topic.send_event(stats_add.inject_context(funs, ctx).json()).map_err(mq_error).await?; + topic.send_event_and_wait(stats_add.inject_context(funs, ctx).json()).map_err(mq_error).await?; } Ok(()) }