Class: VagrantPlugins::ProviderLibvirt::Action::StartShutdownTimer

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-libvirt/action/shutdown_domain.rb

Overview

To wrap GracefulShutdown need to track the time taken

Instance Method Summary collapse

Constructor Details

#initialize(app, _env) ⇒ StartShutdownTimer

Returns a new instance of StartShutdownTimer.



8
9
10
# File 'lib/vagrant-libvirt/action/shutdown_domain.rb', line 8

def initialize(app, _env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



12
13
14
15
16
# File 'lib/vagrant-libvirt/action/shutdown_domain.rb', line 12

def call(env)
  env[:shutdown_start_time] = Time.now

  @app.call(env)
end