On Fri, 20 Nov 2009, gonzoprosperity wrote: > My next thought was to specify a reserve timeout > > job = queue.reserve(20) # seconds > > So that at least every 20 seconds there will be a loop iteration any > SIGTERM sent in the interim can be caught and handled.
This is the method I've adopted for our Python-based workers, I've basically got a SIGINT/SIGTERM handler that basically sets "cont = False" and within the next TIMEOUT period the worker will gracefully die. Cheers, -R. Tyler Ballance -------------------------------------- GitHub: http://github.com/rtyler Twitter: http://twitter.com/agentdero Blog: http://unethicalblogger.com
pgpPK5myI9woH.pgp
Description: PGP signature
