fix: shared ws_tx across reconnects, spawned workflow task, Arc<ServiceManager>
This commit is contained in:
@@ -62,7 +62,7 @@ async fn connect_and_run(
|
||||
server_url: &str,
|
||||
worker_name: &str,
|
||||
llm_config: &crate::LlmConfig,
|
||||
svc_mgr: &ServiceManager,
|
||||
svc_mgr: &Arc<ServiceManager>,
|
||||
shared_ws_tx: &SharedWsTx,
|
||||
comment_tx: &Arc<tokio::sync::Mutex<Option<mpsc::Sender<AgentEvent>>>>,
|
||||
) -> anyhow::Result<()> {
|
||||
@@ -178,7 +178,7 @@ async fn connect_and_run(
|
||||
let (evt_tx, mut evt_rx) = mpsc::channel::<AgentEvent>(32);
|
||||
*comment_tx.lock().await = Some(evt_tx);
|
||||
|
||||
let svc = svc_mgr.clone();
|
||||
let svc = Arc::clone(svc_mgr);
|
||||
let wf_id = workflow_id.clone();
|
||||
let pid = project_id.clone();
|
||||
tokio::spawn(async move {
|
||||
|
||||
Reference in New Issue
Block a user