0.03
No release in over 3 years
Low commit activity in last 3 years
Rate limit how many times a job can be run from a queue
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.25
 Project Readme

Resque Throttler Circle CI

Resque Throttler allows you to throttle the rate at which jobs are performed on a specific queue.

If the queue is above the rate limit then the workers will ignore the queue until the queue is below the rate limit.

Installation

require 'resque/throttler'

Or in a Gemfile:

gem 'resque-throttler', :require => 'resque/throttler'

Usage

require 'resque'
require 'resque/throttler'

# Rate limit at 10 jobs from `my_queue` per minute
Resque.rate_limit(:my_queue, :at => 10, :per => 60)

Similar Resque Plugins

  • resque-queue-lock

    Only allows one job to be performed at once from a queue. With Resque Throttler you can achieve the same functionarliy with the following rate limit:

    Resque.rate_limit(:my_queue, :at => 1, :per => 0)
  • resque-throttle

    Works on a class rather than a queue and will throw and error when you try to enqueue at job when the class is at or above it's rate limit.

  • resque-waiting-room

    Looks like it also works on a class and throws the jobs into a "waiting_room" queue that then gets processed.