aboutsummaryrefslogtreecommitdiffstats
path: root/crates/daemon/src/api/control.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/daemon/src/api/control.rs')
-rw-r--r--crates/daemon/src/api/control.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/daemon/src/api/control.rs b/crates/daemon/src/api/control.rs
index a9d9cff3..94fb7ce9 100644
--- a/crates/daemon/src/api/control.rs
+++ b/crates/daemon/src/api/control.rs
@@ -95,7 +95,9 @@ impl Control for ControlService {
&self,
_request: Request<ForceSyncRequest>,
) -> Result<Response<ForceSyncReply>, Status> {
- let reply = ForceSyncReply { accepted: false };
+ let reply = ForceSyncReply { accepted: true };
+
+ self.handle.emit(DaemonEvent::ForceSync);
Ok(Response::new(reply))
}
@@ -212,7 +214,6 @@ async fn do_sync_tick(
Err(e) => {
tracing::error!("sync tick failed with {e}");
- // Emit failure event
handle.emit(DaemonEvent::SyncFailed {
error: e.to_string(),
});
@@ -251,9 +252,6 @@ async fn do_sync_tick(
tracing::error!("failed to build history from downloaded records: {e}");
}
- // Emit the records added event (for search indexing)
- handle.emit(DaemonEvent::RecordsAdded(downloaded_records.clone()));
-
// Emit sync completed event
handle.emit(DaemonEvent::SyncCompleted {
uploaded: uploaded_count as usize,