mperham/sidekiq — Issue #48: Can not break from a while loop
Author: DangerDawson
Created: 2012-02-20 11:11:28+00:00
State: open

Running the following worker using ruby 1.9.3p0 ( mac os x lion ) and then exiting with ctrl-c sometimes exits ( although you have to give it a second ctrl-c ), and other times you have to kill -9 the worker as it will not exit gracefully

module Worker
class TestWorker
include Sidekiq::Worker

def perform(key)
while true
puts "x"
sleep 1
end
end
end
end

Am I doing something obviously wrong? e.g. you can not use while loops or is it a bug?