cloud_mdir_sync icon indicating copy to clipboard operation
cloud_mdir_sync copied to clipboard

Watchdog

Open wang2357 opened this issue 1 year ago • 4 comments

Use watchdog instead of pyinotify for maildir changes monitoring. The benefit is that the program can be used in other platforms.

wang2357 avatar Sep 16 '24 17:09 wang2357

It is probably reasonable to have a polling approach for macos since it can't use Linux inotify if there is no better alternative, but you shouldn't remove the linux inotify code, it is much better as you noted in another thread..

jgunthorpe avatar Sep 25 '24 22:09 jgunthorpe

The watchdog package is event driven on MacOS and uses inotify on Linux. So it has excellent performance on both platform. The earlier comment I made on watchdog was due to incorrect asyncio calls (basically the watchdog callback needs to be run in the same event loop as the main thread - otherwise the synchronization using needs_update signal is messed up). I have since removed this bug, and the extra delay on Mac due to this bug has been removed. I do not notice any performance degradation with the new code. So please look at the code again to see if it is acceptable.

wang2357 avatar Oct 04 '24 05:10 wang2357

There is a new issue, where the Push notification is no longer working, due to Microsoft removing legacy API. However, that is a totally separate issue. The changes from local to remote due to file changes are detected immediately and updated to cloud immediately.

wang2357 avatar Oct 04 '24 05:10 wang2357

Ok, I will try to test it

jgunthorpe avatar Oct 23 '24 16:10 jgunthorpe