Sha256: 6221c23b417fb92159a78eb06d8a5b92fa259df4fab91fc05aa2c18d2380167f

Contents?: true

Size: 753 Bytes

Versions: 3

Compression:

Stored size: 753 Bytes

Contents

# frozen_string_literal: true

PgExport::Container.boot(:interactive) do
  init do
    require 'pg_export/lib/pg_export/transactions/import_dump_interactively'
  end

  start do
    use :main

    # type = 'plain'
    type = 'interactive'

    transaction = PgExport::Transactions::ImportDumpInteractively.new(ui_input: target["ui.#{type}.input"])

    unless target[:config].logger_muted?
      use :logger

      %i[
        open_connection
        fetch_dumps_from_ftp
        download_dump_from_ftp
        decrypt_dump
        restore
      ].each do |step|
        transaction.subscribe(step => target["listeners.#{type}.#{step}"])
      end
    end

    register('transactions.import_dump_interactively', memoize: true) { transaction }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pg_export-1.0.0.rc3 lib/pg_export/system/boot/interactive.rb
pg_export-1.0.0.rc2 lib/pg_export/system/boot/interactive.rb
pg_export-1.0.0.rc1 lib/pg_export/system/boot/interactive.rb