Class: PerconaMigrator::Command
- Inherits:
-
Object
- Object
- PerconaMigrator::Command
- Defined in:
- lib/percona_migrator/command.rb
Overview
Executes the given command returning it’s status and errors
Constant Summary collapse
- COMMAND_NOT_FOUND =
127
Instance Method Summary collapse
-
#initialize(command_line, error_log_path, logger) ⇒ Command
constructor
Constructor.
-
#run ⇒ Process::Status
Executes the command returning its status.
Constructor Details
#initialize(command_line, error_log_path, logger) ⇒ Command
Constructor
11 12 13 14 15 |
# File 'lib/percona_migrator/command.rb', line 11 def initialize(command_line, error_log_path, logger) @command_line = command_line @error_log_path = error_log_path @logger = logger end |
Instance Method Details
#run ⇒ Process::Status
Executes the command returning its status. It also prints its stdout to the logger and its stderr to the file specified in error_log_path.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/percona_migrator/command.rb', line 25 def run log_deprecations log_started run_in_process log_finished validate_status! status end |