python-zulip-api/zulip
Zev Benjamin 4e02777aaa api: Add an option to backoff classes for making the passage of time count as a success
The idea here is that for usages like in the zephyr mirror bot:

  backoff = RandomExponentialBackoff()
  while backoff.keep_going():
      print "Starting zephyr mirroring bot"
      try:
          subprocess.call(args)
      except:
          traceback.print_exc()
      backoff.fail()

we want it to be the case that the mirror bot running for a while counts as a
success so that the bot doesn't have a finite number of crashes over its entire
lifetime.  We only want the mirror bot to stop retrying if it fails too many
times in a row.

(imported from commit 7b10704d3ce9a5ffb3472cbb4dfa168c9c05ae7a)
2014-04-23 11:31:04 -07:00
..
__init__.py api: Add an option to backoff classes for making the passage of time count as a success 2014-04-23 11:31:04 -07:00