Watchdog technique

John J. Lee jjl at pobox.com
Mon Aug 18 14:49:54 EDT 2003


Terry Hancock <hancock at anansispaceworks.com> writes:

> Hi all,
> I have a program in a webserver environment that needs to run a fairly 
> intensive calculation, which involves C extension calls (image processing 
> with PIL). Most of the time, this works fine, but every once in awhile the 
> calculation will hang, and I can't afford to wait for it (it's better to 
> ditch it and get no result).  This is a classic "heartbeat" or "watchdog" 
> problem.
[...]

Run it in a separate process?  There's a watchdog recipe in the AS
Cookbook that I guess you could incorporate into your main app.


John




More information about the Python-list mailing list