Retry on network failure on windows

38 views
Skip to first unread message

Petr Blahos

unread,
Feb 14, 2016, 11:08:04 AM2/14/16
to watchdog-python
Hi,

I needed to make a change so that the observer does not crash but keeps retrying if the
drive is disconnected, on Windows. So I am catching WindowsError with winerror == 64,
on get_directory_handle and read_events, and in such case I close the handle and retry
in, let's say 5s. With the current watchdog I have to clone the whole read_directory_changes.py,
so I am proposing a change:
to make the replacing of the windows api calls easier.

Would you guys care to have this retrying observer in watchdog? If yes I will prepare another
pull request. Should that replace current WindowsApi(Emitter|Observer) or should those 2 live 
in parallel?

Best regards, 
Petr

Message has been deleted

xiaogiga...@gmail.com

unread,
Jun 22, 2016, 2:45:24 PM6/22/16
to watchdog-python
This would be a real nice feature to have! But I'm totally new into this stuff, so I hope someone, who is competent finds this interesting too.

Kind regards 
Xiao
Reply all
Reply to author
Forward
0 new messages