Sha256: ac1aee4047a4e1e2bc418113a0b798b2151387bf5c27f2bbf6bb61fc9a8731ad

Contents?: true

Size: 244 Bytes

Versions: 7

Compression:

Stored size: 244 Bytes

Contents

require 'sidekiq/web_custom/processor'

module Sidekiq
  module WebCustom
    module Queue
      def drain(max:)
        count = [size, max].min
        Sidekiq::WebCustom::Processor.execute(max: count, queue: self)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sidekiq-web_custom-0.6.0 lib/sidekiq/web_custom/queue.rb
sidekiq-web_custom-0.5.0 lib/sidekiq/web_custom/queue.rb
sidekiq-web_custom-0.4.1 lib/sidekiq/web_custom/queue.rb
sidekiq-web_custom-0.4.0 lib/sidekiq/web_custom/queue.rb
sidekiq-web_custom-0.3.1 lib/sidekiq/web_custom/queue.rb
sidekiq-web_custom-0.3.0 lib/sidekiq/web_custom/queue.rb
sidekiq-web_custom-0.2.0 lib/sidekiq/web_custom/queue.rb