lib/tasque/processor.rb in tasque-0.0.3 vs lib/tasque/processor.rb in tasque-0.0.4
- old
+ new
@@ -33,9 +33,11 @@
@timers.every(check_interval) do
begin
has_task = Tasque::Task.fetch(type) do |task|
@handlers[type.to_sym].call(task)
end
+ rescue ActiveRecord::Deadlocked
+ retry
end while has_task
end
end
def start