Class: PgExport
- Inherits:
-
Object
- Object
- PgExport
- Includes:
- Concurrency
- Defined in:
- lib/pg_export.rb,
lib/pg_export/errors.rb,
lib/pg_export/logging.rb,
lib/pg_export/version.rb,
lib/pg_export/concurrency.rb,
lib/pg_export/configuration.rb,
lib/pg_export/services/utils.rb,
lib/pg_export/entities/sql_dump.rb,
lib/pg_export/entities/dump/base.rb,
lib/pg_export/services/ftp_service.rb,
lib/pg_export/services/dump_storage.rb,
lib/pg_export/entities/compressed_dump.rb,
lib/pg_export/entities/dump/size_human.rb,
lib/pg_export/services/ftp_service/connection.rb
Defined Under Namespace
Modules: Concurrency, Dump, Logging Classes: CompressedDump, Configuration, DumpStorage, FtpService, InvalidConfigurationError, PgDumpError, SqlDump, Utils
Constant Summary collapse
- VERSION =
'0.3.1'.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize {|config| ... } ⇒ PgExport
constructor
A new instance of PgExport.
Methods included from Concurrency
Constructor Details
#initialize {|config| ... } ⇒ PgExport
Returns a new instance of PgExport.
24 25 26 27 28 |
# File 'lib/pg_export.rb', line 24 def initialize @config = Configuration.new yield config if block_given? config.validate end |
Instance Method Details
#call ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/pg_export.rb', line 30 def call concurrently do |job| job << create_dump job << initialize_dump_storage end dump_storage.upload(dump) dump_storage.remove_old(keep: config.keep_dumps) self end |