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