Sha256: 243b06c2db1bd8922b9cc6c3fb31a8ef53043795bce3ae189e7b0956588ce894

Contents?: true

Size: 701 Bytes

Versions: 3

Compression:

Stored size: 701 Bytes

Contents

# frozen_string_literal: true

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

  start do
    use :main

    transaction = PgExport::Transactions::ExportDump.new

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

      type = 'plain'
      # type = 'interactive'

      %i[
        build_dump
        encrypt_dump
        open_connection
        upload_dump_to_ftp
        remove_old_dumps_from_ftp
        close_connection
      ].each do |step|
        transaction.subscribe(step => target["listeners.#{type}.#{step}"])
      end
    end

    register('transactions.export_dump', 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/plain.rb
pg_export-1.0.0.rc2 lib/pg_export/system/boot/plain.rb
pg_export-1.0.0.rc1 lib/pg_export/system/boot/plain.rb