Class: RR::SyncRunner

Inherits:
BaseRunner show all
Defined in:
lib/rubyrep/sync_runner.rb

Overview

This class implements the functionality of the rrsync.rb command.

Constant Summary

Constants inherited from BaseRunner

BaseRunner::DEFAULT_OPTIONS

Instance Attribute Summary

Attributes inherited from BaseRunner

#options, #report_printer_arg, #report_printer_class, #selected_progress_printer, #session

Instance Method Summary collapse

Methods inherited from BaseRunner

#add_specific_options, #execute, #process_options, #progress_printer, #report_printer, run, #signal_scanning_completion, #table_pairs

Instance Method Details

#create_processor(left_table, right_table) ⇒ Object

Creates the correct scan class. Parameters as defined under BaseRunner#create_processor



19
20
21
# File 'lib/rubyrep/sync_runner.rb', line 19

def create_processor(left_table, right_table)
  TableSync.new session, left_table, right_table
end

#prepare_table_pairs(table_pairs) ⇒ Object

Reorders the table pairs to avoid foreign key conflicts. More information on this methods at BaseRunner#prepare_table_pairs.



25
26
27
# File 'lib/rubyrep/sync_runner.rb', line 25

def prepare_table_pairs(table_pairs)
  session.sort_table_pairs(table_pairs)
end

#summary_descriptionObject

Returns summary description string for the scan command.



13
14
15
# File 'lib/rubyrep/sync_runner.rb', line 13

def summary_description
  "Syncs the differences of the specified tables between both databases."
end