Method: Rplex::Processor#run!

Defined in:
lib/rplex/client.rb

#run!Object



95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/rplex/client.rb', line 95

def run! 
  raise "You need to provide a block" unless block_given?
  while true do
    begin
      job_data=@client.next_job
      yield job_data unless job_data.empty?
    rescue ClientError
      puts $!
    end
    sleep @interval
  end
end