Retry on network failure on windows

Skip to first unread message

Petr Blahos

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

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,
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, 

Message has been deleted

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 
Reply all
Reply to author
0 new messages