offlineimap daemon (auto-kill and restart)
ngoonee at gmail.com
Mon Feb 14 02:23:32 GMT 2011
I've been thinking about an idea for 'offlineimapd' or something
similar, but am not sure if the functionality is planned for offlineimap
Firstly, I'm on 64-bit Arch Linux, offlineimap is at 6.3.1 currently.
Since the 6-series release back-in-the-day, offlineimap has given random
hangs with gmail on spotty connections. This probably has more to do
with gmail's sucky IMAP implementation than any inherent offlineimap
fault (since the same does not occur on another gmail account I sync
with), but the net result is that I have conky display the
last-synced-time for offlineimap on my desktop, and when I realize its
been a long time ago (maybe 20 minutes or so) I restart offlineimap.
I thought it'd be useful to have a simple script (offlineimapd for want
of a better name) which monitors the main offlineimap process to restart
it if it hangs. How I've done it manually is to have a hook activate
after every successful sync.
Its not something very complicated, I could probably whip up a simple
bash script which handles that. Would it be a good idea, though? Or
would this sort of logic be best implemented within offlineimap (which
is already multi-threaded, after all).
More information about the OfflineIMAP-project