lib/pallets/worker.rb in pallets-0.9.0 vs lib/pallets/worker.rb in pallets-0.10.0
- old
+ new
@@ -53,9 +53,11 @@
rescue Pallets::Shutdown
@manager.remove_worker(self)
rescue => ex
Pallets.logger.error "#{ex.class.name}: #{ex.message}"
Pallets.logger.error ex.backtrace.join("\n") unless ex.backtrace.nil?
+ # Do not flood the process in case of persisting unforeseen errors
+ sleep 1
@manager.replace_worker(self)
end
def process(job)
begin