Sha256: 3c6ca0a6bf82991497afd65768f654ef4d531a06dc8f0327a04070fa166533c9

Contents?: true

Size: 426 Bytes

Versions: 3

Compression:

Stored size: 426 Bytes

Contents

module Resque
  module Plugins
    module Pause
      PAUSE_CHECK_INTERVAL = 10 #seconds to wait when queue is paused

      def before_perform_pause(*args)
        if ResquePauseHelper.paused?(@queue)
          Kernel.sleep(@pause_check_interval || Resque::Plugins::Pause::PAUSE_CHECK_INTERVAL)
          ResquePauseHelper.check_paused(:queue => @queue, :class => self, :args => args)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
resque-pause-0.3.0 lib/resque-pause/plugins/pause.rb
resque-pause-0.2.0 lib/resque-pause/plugins/pause.rb
resque-pause-0.1.0 lib/resque-pause/plugins/pause.rb