mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 20:55:47 +01:00
cluster: Fix use of stream timestamp in action
This commit is contained in:
parent
1e082086e5
commit
7ede2fa79c
1 changed files with 3 additions and 7 deletions
|
|
@ -13,10 +13,7 @@ use iroh::{
|
|||
use reaction_plugin::{Line, shutdown::ShutdownController};
|
||||
use remoc::rch::mpsc as remocMpsc;
|
||||
use tokio::sync::mpsc as tokioMpsc;
|
||||
use treedb::{
|
||||
Database,
|
||||
time::{Time, now},
|
||||
};
|
||||
use treedb::{Database, time::Time};
|
||||
|
||||
use crate::{ActionInit, StreamInit, connection::ConnectionManager, endpoint::EndpointManager};
|
||||
|
||||
|
|
@ -135,14 +132,13 @@ impl ActionInit {
|
|||
while let Ok(Some(m)) = self.rx.recv().await {
|
||||
eprintln!("DEBUG action: received a message to send to connections");
|
||||
let line = self.send.line(m.match_);
|
||||
let now = now();
|
||||
if self.self_
|
||||
&& let Err(err) = own_stream_tx.send((line.clone(), now.into())).await
|
||||
&& let Err(err) = own_stream_tx.send((line.clone(), m.time)).await
|
||||
{
|
||||
eprintln!("ERROR while queueing message to be sent to own cluster stream: {err}");
|
||||
}
|
||||
|
||||
let line = (Arc::new(line), now);
|
||||
let line = (Arc::new(line), m.time.into());
|
||||
for result in join_all(nodes_tx.iter().map(|tx| tx.send(line.clone()))).await {
|
||||
if let Err(err) = result {
|
||||
eprintln!("ERROR while queueing message to be sent to cluster nodes: {err}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue