lib/larva/worker_pool.rb in larva-0.7.1 vs lib/larva/worker_pool.rb in larva-0.7.2

- old
+ new

@@ -30,10 +30,14 @@ rescue => e logger.error "Unexpected listener termination: #{e} #{e.backtrace}" end def keep_workers_alive - sleep(5) while workers.all? { |t| t.alive? } + while workers.all? { |t| t.alive? } + logger.info 'All threads are alive.' + sleep(60) + end + logger.error 'Some threads have died:' workers.each do |worker| logger.error "#{worker[:name]} was #{worker.alive? ? 'alive' : 'dead'}" end end