Class: Gorgon::ShutdownManager

Inherits:
Object
  • Object
show all
Defined in:
lib/gorgon/shutdown_manager.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ ShutdownManager

Returns a new instance of ShutdownManager.



4
5
6
7
# File 'lib/gorgon/shutdown_manager.rb', line 4

def initialize(args)
  @protocol = args.fetch(:protocol)
  @job_state = args.fetch(:job_state)
end

Instance Method Details

#cancel_jobObject



9
10
11
12
13
# File 'lib/gorgon/shutdown_manager.rb', line 9

def cancel_job
  @protocol.cancel_job if @protocol
ensure
  cancel_job_state
end