You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In taskiq/cli/watcher.py, only the event types "opened" and "closed" were ignored. The "closed_no_write" event triggered an endless loop.
this is code:
classFileWatcher: # pragma: no cover"""Filewatcher that watches for filesystem changes."""
...
defdispatch(self, event: FileSystemEvent) ->None:
""" React to event. This function checks whether we need to react to event and calls callback if we do. :param event: incoming fs event. """ifevent.is_directory:
returnifevent.event_typein {"opened", "closed"}:
returnif".git"inevent.src_path:
returntry:
ifself.gitignoreandself.gitignore(event.src_path):
returnexceptExceptionasexc:
logger.info(
f"Cannot check path `{event.src_path!r}` in gitignore. Cause: {exc}",
)
returnlogger.debug(f"File changed. Event: {event}")
self.callback(**self.callback_kwargs)
I am looking at the same issue. For me it is close no write events on __pycache__ files which live under my monitored folders.
I am getting around this for now by monkey patching the FileWatcher dispatch method.
Okay. Seems like like something has changed in the way we watch for files. Maybe lib update.
As a workaround you can add --reload-dir {project_dir}. This workaround will solve your issue. But I still need to look into it to resolve this problem without any arguments.
Confirmed this affects 0.12.1 on Linux with an OrbStack Docker bind mount.
I managed to work around it by monkey-patching FileWatcher.dispatch to add "closed_no_write" to the filtered event types.
The --reload-dir workaround doesn't fully resolve it as the events still originate from within the specified directory.
Activity
CDU-Ge commentedon Dec 9, 2025
Perhaps adding an environment variable
TASKIQ_RELOAD_IGNORE_EVENT_TYPEwould be a good idea.sebastianjanisch commentedon Dec 9, 2025
I am looking at the same issue. For me it is close no write events on
__pycache__files which live under my monitored folders.I am getting around this for now by monkey patching the
FileWatcherdispatch method.s3rius commentedon Dec 16, 2025
Okay. Seems like like something has changed in the way we watch for files. Maybe lib update.
As a workaround you can add
--reload-dir {project_dir}. This workaround will solve your issue. But I still need to look into it to resolve this problem without any arguments.gegnew commentedon Dec 20, 2025
This is also happening for me on
__pycache__files, and the file watcher doesn't seem to be respecting my.gitignore.epicwhale commentedon Dec 24, 2025
Think I'm running into the same issue as @gegnew #574
albireox commentedon Jan 15, 2026
It seems #568 fixes this issue. Any chances of having a point release with this fix soon?
mike-cgr commentedon Apr 16, 2026
Confirmed this affects 0.12.1 on Linux with an OrbStack Docker bind mount.
I managed to work around it by monkey-patching FileWatcher.dispatch to add "closed_no_write" to the filtered event types.
The
--reload-dirworkaround doesn't fully resolve it as the events still originate from within the specified directory.Looking forward to a 0.12.2 release. Cheers.
s3rius commentedon May 4, 2026
The release has happened and this issue should be resolved. Please verify the fix and consider closing if the problem is gone.