Class: Gorgon::ShutdownManager
- Inherits:
-
Object
- Object
- Gorgon::ShutdownManager
- Defined in:
- lib/gorgon/shutdown_manager.rb
Instance Method Summary collapse
- #cancel_job ⇒ Object
-
#initialize(args) ⇒ ShutdownManager
constructor
A new instance of ShutdownManager.
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_job ⇒ Object
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 |