Complete.Org: Mailing Lists: Archives: offlineimap: April 2004:
Connection problems: fix with wrapper
Home

Connection problems: fix with wrapper

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: Connection problems: fix with wrapper
From: Jared Rhine <jared@xxxxxxxxxxx>
Date: Thu, 22 Apr 2004 07:54:57 -0700

[Matthew == matthew@xxxxxxxxxxx on Wed, 21 Apr 2004 16:18:00 -0600]

>> while true; do offlineimap; done

Matthew> Seriously, though, I guess one of us needs to step up to the
Matthew> plate and put in some exception handling.

Respectfully, it's not obvious to everyone that is the correct route.

No matter how much exception-handling code you put in, there is always
the chance of an uncaught bug forcing an unwelcome exit.  If you don't
use a "real" system to monitor and restart your daemons, your process
will then stay down without manual intervention.  If you use the
widely-accepted technique of wrapping offlineimap inside a
daemon-management system (daemontools, runit, cron), then you've
actually solved the problem, and you don't care whether offlineimap
exits after an uncaught exception.

If you do actually add some more exception checks, it will likely be a
welcome addition and the community will thank you...but (IMHO) you
will still have an incomplete solution until you wrap offlineimap
properly.  This isn't just an offlineimap issue; EVERY daemon should
be so wrapped if at all possible.

The fact that what you are describing doesn't actually fix the problem
is likely one reason it hasn't been a priority to fix.

Search the archives for my description of how I integrated daemontools
and offlineimap.  I've moved on to runit but the approach is the same.

-- jared@xxxxxxxxxxx

http://www.geekcode.com/geek.html
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/B
d s:++>+ a-
C++(++++)$ ULBSH++++ P+++ L+++ E++(+++) W++++ N- !o !K w !O M V
PS+++(-) PE++(--) Y+ PGP>++
t@ 5 X+ R>+ tv++>-- b>++ DI+ D- G
e++ h- r++>+++ y+++
------END GEEK CODE BLOCK------


[Prev in Thread] Current Thread [Next in Thread]