Sha256: 0de80a55ee5784a0129a310ba431dbd7f6d83b3320f6e64da5546eb96aaa84e1

Contents?: true

Size: 337 Bytes

Versions: 2

Compression:

Stored size: 337 Bytes

Contents

module Resque
  class Job
    class <<self
      alias_method :origin_reserve, :reserve
      
      def reserve(queue)
        if queue == 'restriction' && payload = Resque.pop(queue)
          constantize(payload['class']).repush(*payload['args'])
          return
        end
        origin_reserve(queue)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque-restriction-0.2.1 lib/resque-restriction/job.rb
resque-restriction-0.2.0 lib/resque-restriction/job.rb