From: ara.t.howard@... Date: 2006-06-10T00:17:12+09:00 Subject: Re: Package idea: attempt On Fri, 9 Jun 2006, Daniel Berger wrote: > Yep, definitely something to watch out for. What can I say? Use with > caution. :) for what it's worth have my own version of attempt in a few near-real-time systems where the overriding principle is : keep going at all costs. in these systems the 'fail big and fail early' priciple doesn't work unless one enjoys working on sundays - so i've got lots of stuff like attempt - it all logs to stderr and/or logs however, so it doesn't go unnoticed. on another note i've found that incremental sleep increse with reset is almost always what you want. retrying on the same interval seems to clog up systems as you get in certain timing rythyms. in rq i use this alot http://codeforpeople.com/lib/ruby/rq/rq-2.3.3/lib/rq-2.3.3/sleepcycle.rb it's a cycle that looks like a sawtooth wave - so basically on each retry we timeout for longer than before, essentially becoming more and more 'patient' before getting really 'impatient' again. i've found this matched the real world pretty well since timing out a bunch in a short period normally means you should wait longer. cheers. -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama