Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl-Aksel Puulmann committed Sep 5, 2014
1 parent 439ee9f commit e673c10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mongoriver/abstract_persistent_tailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(upstream, type, opts={})

@last_saved = {}
@batch = opts[:batch]
@last_read = read_state
@last_read = read_state || {}
@save_frequency = opts[:save_frequency] || DEFAULT_SAVE_FREQUENCY
end

Expand All @@ -43,6 +43,7 @@ def stream(limit=nil)

if !found_entry && !entries_left
@last_read['time'] = start_time
@last_read['placeholder'] = most_recent_position(start_time)
maybe_save_state unless @batch
end

Expand Down

0 comments on commit e673c10

Please sign in to comment.