Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.43 KB

README.md

File metadata and controls

54 lines (37 loc) · 1.43 KB

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.