From 74263237953598e1441cf9f02469b75ff7194785 Mon Sep 17 00:00:00 2001 From: Alex Reece Date: Thu, 30 Nov 2017 20:13:38 -0800 Subject: [PATCH] unconditionally save tail state on initial import --- lib/mosql/streamer.rb | 12 +++++------- lib/mosql/version.rb | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/mosql/streamer.rb b/lib/mosql/streamer.rb index d980f13..cd40afe 100644 --- a/lib/mosql/streamer.rb +++ b/lib/mosql/streamer.rb @@ -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 = [] @@ -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 diff --git a/lib/mosql/version.rb b/lib/mosql/version.rb index f4449b1..70c29c6 100644 --- a/lib/mosql/version.rb +++ b/lib/mosql/version.rb @@ -1,3 +1,3 @@ module MoSQL - VERSION = "0.4.3" + VERSION = "0.4.4" end