Can get sync thread status
This commit is contained in:
@@ -16,6 +16,7 @@ pub enum MatrixManagerMsg {
|
||||
DisconnectClient(UserEmail),
|
||||
StartSyncThread(UserEmail),
|
||||
StopSyncThread(UserEmail),
|
||||
SyncThreadGetStatus(UserEmail, RpcReplyPort<bool>),
|
||||
SyncThreadTerminated(UserEmail, MatrixSyncTaskID),
|
||||
}
|
||||
|
||||
@@ -127,6 +128,12 @@ impl Actor for MatrixManagerActor {
|
||||
log::error!("Failed to request sync thread stop: {e}");
|
||||
}
|
||||
}
|
||||
MatrixManagerMsg::SyncThreadGetStatus(email, reply) => {
|
||||
let started = state.running_sync_threads.contains_key(&email);
|
||||
if let Err(e) = reply.send(started) {
|
||||
log::error!("Failed to send sync thread status! {e}");
|
||||
}
|
||||
}
|
||||
MatrixManagerMsg::SyncThreadTerminated(email, task_id) => {
|
||||
if state.running_sync_threads.get(&email) == Some(&task_id) {
|
||||
log::info!(
|
||||
|
||||
Reference in New Issue
Block a user