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

Commit

Permalink
Merge pull request #97 from fedot/skip_import
Browse files Browse the repository at this point in the history
Adding option to skip initial import and just tail the oplog
  • Loading branch information
nelhage committed May 20, 2015
2 parents 9bcd385 + d52acf3 commit c17cb5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/mosql/cli.rb
Expand Up @@ -87,6 +87,10 @@ def parse_args
@options[:skip_tail] = true
end

opts.on("--skip-import", "Don't import data before tailing oplog") do
@options[:skip_import] = true
end

opts.on("--reimport", "Force a data re-import") do
@options[:reimport] = true
end
Expand Down Expand Up @@ -164,7 +168,9 @@ def run
:sql => @sql,
:schema => @schema)

@streamer.import
unless options[:skip_import]
@streamer.import
end

unless options[:skip_tail]
@streamer.optail
Expand Down

0 comments on commit c17cb5f

Please sign in to comment.