Class: Avm::EacWebappBase0::Instances::Runners::Data::Load
- Inherits:
-
Object
- Object
- Avm::EacWebappBase0::Instances::Runners::Data::Load
- Defined in:
- lib/avm/eac_webapp_base0/instances/runners/data/load.rb
Instance Method Summary collapse
- #dump_instance_method ⇒ Object
- #dump_path_uncached ⇒ Object
- #load_dump ⇒ Object
- #run ⇒ Object
- #source_instance_dump_path ⇒ Object
Instance Method Details
#dump_instance_method ⇒ Object
46 47 48 |
# File 'lib/avm/eac_webapp_base0/instances/runners/data/load.rb', line 46 def dump_instance_method :dump_database end |
#dump_path_uncached ⇒ Object
28 29 30 31 32 33 |
# File 'lib/avm/eac_webapp_base0/instances/runners/data/load.rb', line 28 def dump_path_uncached return parsed.dump_path.to_s if parsed.dump_path.present? return source_instance_dump_path if parsed.source_instance.present? raise "Dump path unknown (Options: #{parsed})" end |
#load_dump ⇒ Object
41 42 43 44 |
# File 'lib/avm/eac_webapp_base0/instances/runners/data/load.rb', line 41 def load_dump info "Loading dump \"#{dump_path}\"..." package_load.run end |
#run ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/avm/eac_webapp_base0/instances/runners/data/load.rb', line 20 def run return fatal_error("Dump \"#{dump_path}\" does not exist") unless ::File.exist?(dump_path) load_dump success("Dump loaded from \"#{dump_path}\"") end |
#source_instance_dump_path ⇒ Object
35 36 37 38 39 |
# File 'lib/avm/eac_webapp_base0/instances/runners/data/load.rb', line 35 def source_instance_dump_path runner_context.call(:instance).class.by_id(parsed.source_instance).run_subcommand( ::Avm::EacWebappBase0::Instances::Runners::Data::Dump, [] ) end |