Class: Pcrd::Commands::Readiness
- Inherits:
-
Object
- Object
- Pcrd::Commands::Readiness
- Defined in:
- lib/pcrd/commands/readiness.rb
Overview
Builds the target-readiness manifest by comparing source and target. Read-only; does not modify either cluster.
Instance Method Summary collapse
-
#initialize(config, options = {}) ⇒ Readiness
constructor
A new instance of Readiness.
- #run ⇒ Object
Constructor Details
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/pcrd/commands/readiness.rb', line 13 def run raise ConfigError, "target connection required for readiness" if @config.target.nil? raise ConfigError, "no tables configured" if (@config.migrate&.tables || []).empty? source = Connection::Client.new(@config.source) target = Connection::Client.new(@config.target) result = Pcrd::Readiness::Manifest.new( source_pool: source, target_pool: target, config: @config ).build source.close target.close result end |