Module: Sqskiq::SignalHandler
- Includes:
- Celluloid, Celluloid::Notifications
- Included in:
- BatchProcessor, Manager, Processor
- Defined in:
- lib/sqskiq/signal_handler.rb
Instance Method Summary collapse
Instance Method Details
#shutting_down(signal) ⇒ Object
14 15 16 |
# File 'lib/sqskiq/signal_handler.rb', line 14 def shutting_down(signal) @shutting_down = true end |
#subscribe_for_shutdown ⇒ Object
8 9 10 11 12 |
# File 'lib/sqskiq/signal_handler.rb', line 8 def subscribe_for_shutdown subscribe('SIGINT', :shutting_down) subscribe('TERM', :shutting_down) subscribe('SIGTERM', :shutting_down) end |