lib/deimos/utils/db_producer.rb in deimos-ruby-1.8.1.pre.beta6 vs lib/deimos/utils/db_producer.rb in deimos-ruby-1.8.1.pre.beta7
- old
+ new
@@ -159,11 +159,11 @@
message_record = messages[record.topic]
# We want to record the last time we saw any activity, meaning either
# the oldest message, or the last time we processed, whichever comes
# last.
if message_record
- record_earliest = record.earliest
+ record_earliest = message_record.earliest
# SQLite gives a string here
if record_earliest.is_a?(String)
record_earliest = Time.zone.parse(record_earliest)
end
@@ -229,10 +229,10 @@
topic = batch.first.topic
return batch if config.compact_topics != :all &&
!config.compact_topics.include?(topic)
- batch.reverse.uniq!(&:key).reverse!
+ batch.reverse.uniq(&:key).reverse!
end
end
end
end