class SearchKit::Polling
This file houses the polling loop of the Event service.
Attributes
block[R]
channel[R]
Public Class Methods
new(channel, &block)
click to toggle source
# File lib/search_kit/polling.rb, line 13 def initialize(channel, &block) @block = block @channel = channel end
perform(channel, &block)
click to toggle source
# File lib/search_kit/polling.rb, line 7 def self.perform(channel, &block) new(channel, &block).perform end
Public Instance Methods
perform()
click to toggle source
# File lib/search_kit/polling.rb, line 18 def perform loop do process_queue sleep 1 end end
process_queue()
click to toggle source
# File lib/search_kit/polling.rb, line 25 def process_queue SearchKit::Polling::Process.perform(channel, &block) end