Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Commit

Permalink
unconditionally save tail state on initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
awreece committed Dec 1, 2017
1 parent 98e282f commit 7426323
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions lib/mosql/streamer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,10 @@ def track_time
def initial_import
@schema.create_schema(@sql.db, !options[:no_drop_tables])

unless options[:skip_tail]
start_state = {
'time' => nil,
'position' => @tailer.most_recent_position
}
end
start_state = {
'time' => nil,
'position' => @tailer.most_recent_position
}

dbnames = []

Expand Down Expand Up @@ -115,7 +113,7 @@ def initial_import
end
end

tailer.save_state(start_state) unless options[:skip_tail]
tailer.save_state(start_state)
end

def did_truncate; @did_truncate ||= {}; end
Expand Down
2 changes: 1 addition & 1 deletion lib/mosql/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module MoSQL
VERSION = "0.4.3"
VERSION = "0.4.4"
end

0 comments on commit 7426323

Please sign in to comment.