Skip to content

fix(reload): filter filesystem events before queueing - #688

Open
zmylol wants to merge 1 commit into
taskiq-python:masterfrom
zmylol:fix/reload-event-filter
Open

zmylol wants to merge 1 commit into
taskiq-python:masterfrom
zmylol:fix/reload-event-filter

Conversation

@zmylol

@zmylol zmylol commented Sep 27, 2026 •

Copy link
Copy Markdown

Filesystem open and close events were queued by watchdog and only discarded later by FileWatcher.dispatch(). When event dispatch was blocked, read-only file access could keep adding unnecessary events to the queue.

Configure Observer.schedule() to accept only file creation, modification, deletion, and movement events. Closing events were already ignored by FileWatcher, so excluding them before queueing preserves existing reload behavior.

Require watchdog >= 4.0.2 because that version adds event_filter support to macOS's FSEventsObserver.

Validation:

  • Full test suite on Windows: 383 passed.
  • Linux regression tests: 14 passed with watchdog 6.0.0; 12 passed and 2 expected skips with 4.0.2.
  • Native Linux checks verified blocked dispatch, 500 read-only accesses, recursive watching, and atomic file replacement.
  • All checks passed for the changed files.

Fixes #684

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--reload queues every open and close event because FileWatcher is scheduled without event_filter

1 participant