Class: DumpCleaner::Cleaners::MysqlShellDumpCleaner

Inherits:
BaseCleaner
  • Object
show all
Includes:
MysqlShellDumpHelpers
Defined in:
lib/dump_cleaner/cleaners/mysql_shell_dump_cleaner.rb

Instance Attribute Summary

Attributes inherited from BaseCleaner

#config, #options

Instance Method Summary collapse

Methods included from MysqlShellDumpHelpers

#destination_file_for

Methods inherited from BaseCleaner

#initialize, #keep_same_record?

Constructor Details

This class inherits a constructor from DumpCleaner::Cleaners::BaseCleaner

Instance Method Details

#cleanObject



15
16
17
18
19
20
21
22
23
# File 'lib/dump_cleaner/cleaners/mysql_shell_dump_cleaner.rb', line 15

def clean
  config.cleanup_tables.each do |db, table|
    table_cleaner = MysqlShellTableCleaner.new(db:, table:, config:, options:)

    table_cleaner.pre_cleanup
    table_cleaner.clean
    table_cleaner.post_cleanup
  end
end

#post_cleanupObject



25
26
27
# File 'lib/dump_cleaner/cleaners/mysql_shell_dump_cleaner.rb', line 25

def post_cleanup
  copy_remaining_files
end

#pre_cleanupObject



10
11
12
13
# File 'lib/dump_cleaner/cleaners/mysql_shell_dump_cleaner.rb', line 10

def pre_cleanup
  validate_source_dump
  prepare_destination_dump
end