lib/tasque/processor.rb in tasque-0.2.2 vs lib/tasque/processor.rb in tasque-0.2.3
- old
+ new
@@ -37,10 +37,10 @@
@timers.every(check_interval) do
begin
has_task = Tasque::Task.fetch(type) do |task|
@handlers[type.to_sym].call(task)
end
- rescue ActiveRecord::Deadlocked
+ rescue ActiveRecord::Deadlocked, ActiveRecord::LockWaitTimeout
retry
end while has_task
end
end