-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change FileWatcher to ignore watchfile heartbeat timeout.
The rust_timeout parameter in awatch() controls how long the underlying Rust code waits for file changes before checking if it should stop. In result in non-windows system missleading debug log was printed every 5 seconds: ` DEBUG watchfiles.main:267: rust notify timeout, continuing` Set `rust_timeout` to sys.maxsize - 1 as we don't need frequent timeouts for proper interrupt handling on non-Windows systems. yield_on_timeout was changed to True to yield empty set on this timeout error instead of printing debug log. This is safe because: - Unix systems use native file system events (inotify/FSEvents) - Process interruption works reliably without shorter timeouts - The large timeout value doesn't affect file change detection performance
- Loading branch information
1 parent
b3c98e5
commit 5a84c3d
Showing
2 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters