Skip to content

CodingNinjasHQ/resque-throttler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Rate limit how many times a job can be run from a queue

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%