Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions mm2src/rpc_task/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use crate::task::RpcTaskTypes;
use crate::{AtomicTaskId, RpcTask, RpcTaskError, RpcTaskHandle, RpcTaskResult, RpcTaskStatus, RpcTaskStatusAlias,
TaskAbortHandle, TaskAbortHandler, TaskId, TaskStatus, TaskStatusError, UserActionSender};
use common::executor::SpawnFuture;
use common::log::{debug, info, warn};
use common::log::{debug, info, trace, warn};
use futures::channel::oneshot;
use futures::future::{select, Either};
use mm2_err_handle::prelude::*;
use mm2_event_stream::{Event, StreamingManager};
use mm2_event_stream::{Event, StreamingManager, StreamingManagerError};
use std::collections::hash_map::Entry;
use std::collections::HashMap;
use std::sync::atomic::Ordering;
Expand Down Expand Up @@ -196,7 +196,13 @@ impl<Task: RpcTask> RpcTaskManager<Task> {
serde_json::to_value(new_status).expect("Serialization shouldn't fail."),
);
if let Err(e) = self.streaming_manager.broadcast_to(event, client_id) {
warn!("Failed to send task status update to the client (ID={client_id}): {e:?}");
match e {
StreamingManagerError::UnknownClient => {
// TODO: Set this log to warn level once we stop setting a default client ID in task managed requests (i.e. after migrating event streaming to WS).
trace!("Failed to send task status update to the client (ID={client_id}): {e:?}")
},
_ => warn!("Failed to send task status update to the client (ID={client_id}): {e:?}"),
}
}
};
}
Expand Down
Loading