This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cribbed from http://vimeo.com/52569901 (Twilio carrier call origination moderation) | |
# The idea is that many fan-in queues can enqueue at any rate, but | |
# dequeue needs to happen in a rate-controlled manner without allowing | |
# any individual input queue to starve other queues. | |
# http://en.wikipedia.org/wiki/Leaky_bucket (second sense, "This version is referred to here as the leaky bucket as a queue.") | |
# | |
# requires: | |
# redis 2.6+ | |
# redis-py>=2.7.0 | |
# anyjson |