Fix macro forwarding
This commit is contained in:
parent
d9afc6b4f2
commit
f7216be6e5
4 changed files with 4 additions and 4 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -815,7 +815,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "emgauwa-core"
|
name = "emgauwa-core"
|
||||||
version = "0.5.3"
|
version = "0.5.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix",
|
"actix",
|
||||||
"actix-cors",
|
"actix-cors",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "emgauwa-core"
|
name = "emgauwa-core"
|
||||||
version = "0.5.3"
|
version = "0.5.4"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Tobias Reisinger <tobias@msrg.cc>"]
|
authors = ["Tobias Reisinger <tobias@msrg.cc>"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ pub async fn execute(
|
||||||
let affected_relays =
|
let affected_relays =
|
||||||
collect_affected_relays(&mut pool_conn, &mut actions, &controller).await?;
|
collect_affected_relays(&mut pool_conn, &mut actions, &controller).await?;
|
||||||
|
|
||||||
ws_server_tx.send(WsServerAction::ForwardToController(uid.clone(), ControllersWsAction::Relays(affected_relays.clone())))?;
|
ws_server_tx.send(WsServerAction::ForwardToController(controller.uid.clone(), ControllersWsAction::Relays(affected_relays.clone())))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
pool_conn.close().await?;
|
pool_conn.close().await?;
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ impl WsServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WsServerAction::ForwardToController(uid, action) => {
|
WsServerAction::ForwardToController(uid, action) => {
|
||||||
log::debug!("Forwarding action: {:?}", action);
|
log::debug!("Forwarding action: {:?} to controller {}", action, uid);
|
||||||
if let Some((_, address)) = self.controllers.get(&uid) {
|
if let Some((_, address)) = self.controllers.get(&uid) {
|
||||||
self.text_to_controller_conn(*address, serde_json::to_string(&action)?);
|
self.text_to_controller_conn(*address, serde_json::to_string(&action)?);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue