Skip to content

Commit

Permalink
fix(watcher): accept query without sn
Browse files Browse the repository at this point in the history
  • Loading branch information
edytapawlak committed Aug 19, 2024
1 parent a4feb98 commit f5487aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/watcher/src/watcher/watcher_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ impl WatcherData {
match (local_state, args.s) {
(Some(state), Some(sn)) if sn <= state.sn => {
// KEL is already in database
},
(Some(state), None) => {
// Check for updates.
let id_to_update = qry.query.get_prefix();
self.tx.send(id_to_update.clone()).await.map_err(|_e| {
ActorError::GeneralError("Internal watcher error".to_string())
})?;
}
_ => {
// query watcher and return info, that it's not ready
Expand Down

0 comments on commit f5487aa

Please sign in to comment.