lib/deimos/utils/db_poller/time_based.rb in deimos-ruby-1.18.1 vs lib/deimos/utils/db_poller/time_based.rb in deimos-ruby-1.18.2

- old
+ new

@@ -34,10 +34,13 @@ # poll_query gets all the relevant data from the database, as defined # by the producer itself. loop do Deimos.config.logger.debug("Polling #{@producer.topic}, batch #{status.current_batch}") batch = fetch_results(time_from, time_to).to_a - break if batch.empty? + if batch.empty? + @info.touch(:last_sent) + break + end process_and_touch_info(batch, status) time_from = last_updated(batch.last) end Deimos.config.logger.info("Poll #{@producer.topic} complete at #{time_to} (#{status.report})")