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
Having written my code in a rush, I set the path to be a file rather than a directory.
The code runs without warnings or errors, but fails to report modifications to the file.
It seems watchdog supports only monitoring directories, not individual files.
I suggest watchdog should either:
A) support events on a single file (perhaps this can be done simply by monitoring its directory and ignoring changes on everything that isn't that file)
This solution seems more ergonomic from user POV.
Alternatively,
B) If given path is file, throw an exception and say it must be a directory
(Please forgive me if I've overlooked something, I haven't had time to take a proper look at how watchdog works yet.)
The text was updated successfully, but these errors were encountered:
Could you post your code to reproduce the silent fail?
I tried to reproduce specifying file rather than a directory and then changing it. Watchdog once printed Deleted directory: and my path to file. Not sure if it's a correct behavior but at least it doesn't fail. When I changed the file observed nothing happened.
Having written my code in a rush, I set the path to be a file rather than a directory.
The code runs without warnings or errors, but fails to report modifications to the file.
It seems watchdog supports only monitoring directories, not individual files.
I suggest watchdog should either:
A) support events on a single file (perhaps this can be done simply by monitoring its directory and ignoring changes on everything that isn't that file)
This solution seems more ergonomic from user POV.
Alternatively,
B) If given path is file, throw an exception and say it must be a directory
(Please forgive me if I've overlooked something, I haven't had time to take a proper look at how watchdog works yet.)
The text was updated successfully, but these errors were encountered: