Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

observer dies randomly #663

Open
jacobthetechy opened this issue May 9, 2020 · 3 comments
Open

observer dies randomly #663

jacobthetechy opened this issue May 9, 2020 · 3 comments

Comments

@jacobthetechy
Copy link

I'm observing a log file on Windows 7 machine. And randomly the observer will die with no error raised. This would happen within a couple of days of watching the file.

I've used the normal Observer() and PollingObserver() with no difference. I'm subclassing the PatternMatchingEventHandler and watching a single file.

Is there a way to find out what cause the observer to die? And is there a way to restart it once it dies?

@earonesty
Copy link

earonesty commented Dec 17, 2020

the error is here:

https://github.com/gorakhargosh/watchdog/blob/master/src/watchdog/observers/api.py

no exception handling when queue_events fails, and nothing is watching when the emitter drops out.

both polling and non-polling can have issues at event queue time.

easiest probably just to catch an error there, and emit something. then the user can at least handle it appropriately

@earonesty
Copy link

This kind of thing might make it recoverable: https://github.com/gorakhargosh/watchdog/pull/738/files

@KiraPC
Copy link

KiraPC commented Mar 9, 2021

Hi, there's some update on this?

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

No branches or pull requests

3 participants