Sha256: b00b8a592a690491b847509900de02230eec1f796e4dfa1e7ea6b6425a3cd45a
Contents?: true
Size: 909 Bytes
Versions: 5
Compression:
Stored size: 909 Bytes
Contents
module Resque module Plugins module RateLimitedQueue class UnPause @queue = nil class << self attr_writer(:queue) def use? Resque.respond_to?(:enqueue_at_with_queue) && @queue end def enqueue(timestamp, klass) # If Resque scheduler is installed and queue is set - use it to queue a wake up job return unless use? Resque.enqueue_at_with_queue( @queue, timestamp, Resque::Plugins::RateLimitedQueue::UnPause, klass) end def perform(klass) class_from_string(klass.to_s).un_pause end def class_from_string(str) str.split('::').reduce(Object) do |mod, class_name| mod.const_get(class_name) end end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems