-
-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Taskiq version
0.12.1
Python version
Python 3.12
OS
Linux
What happened?
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:
class FileWatcher: # pragma: no cover
"""Filewatcher that watches for filesystem changes."""
...
def dispatch(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.
"""
if event.is_directory:
return
if event.event_type in {"opened", "closed"}:
return
if ".git" in event.src_path:
return
try:
if self.gitignore and self.gitignore(event.src_path):
return
except Exception as exc:
logger.info(
f"Cannot check path `{event.src_path!r}` in gitignore. Cause: {exc}",
)
return
logger.debug(f"File changed. Event: {event}")
self.callback(**self.callback_kwargs)Relevant log output
Broker initialization code
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working