From 24c8cb6ef2310db9d5b6d7f1982dcf003126875e Mon Sep 17 00:00:00 2001 From: ljl <17743125563@163.com> Date: Thu, 18 Jan 2024 17:40:18 +0800 Subject: [PATCH] flow:fix event. --- middleware/flow/src/flow_initializer.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/middleware/flow/src/flow_initializer.rs b/middleware/flow/src/flow_initializer.rs index b14f18227..6dd35763a 100644 --- a/middleware/flow/src/flow_initializer.rs +++ b/middleware/flow/src/flow_initializer.rs @@ -34,6 +34,7 @@ use crate::{ pub async fn init(web_server: &TardisWebServer) -> TardisResult<()> { let funs = flow_constants::get_tardis_inst(); init_db(funs).await?; + tokio::spawn(init_event()); init_api(web_server).await } @@ -853,7 +854,8 @@ pub async fn init_flow_model(funs: &TardisFunsInst, ctx: &TardisContext) -> Tard Ok(()) } -async fn init_event(funs: TardisFunsInst) -> TardisResult<()> { +async fn init_event() -> TardisResult<()> { + let funs = flow_constants::get_tardis_inst(); let conf = funs.conf::(); if let Some(event_config) = conf.event.as_ref() { loop {