Skip to content

Commit

Permalink
Use PollWatcher to always get filesystem updates
Browse files Browse the repository at this point in the history
See #2102 (comment)
for explanation on this

Closes #2102, #2035, #383 and #1441
  • Loading branch information
KFearsoff committed Nov 18, 2023
1 parent 6f6de2c commit 7fd09a9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cmd/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,15 @@ where

// Create a channel to receive the events.
let (tx, rx) = channel();

let mut debouncer = match notify_debouncer_mini::new_debouncer(Duration::from_secs(1), None, tx)
{
// Notify backend configuration
let backend_config = notify::Config::default().with_poll_interval(Duration::from_secs(1));

let mut debouncer = match notify_debouncer_mini::new_debouncer_opt::<_, notify::PollWatcher>(
Duration::from_secs(1),
None,
tx,
backend_config,
) {
Ok(d) => d,
Err(e) => {
error!("Error while trying to watch the files:\n\n\t{:?}", e);
Expand Down

0 comments on commit 7fd09a9

Please sign in to comment.