Class: Chutzen::Signal
- Inherits:
-
Object
- Object
- Chutzen::Signal
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/chutzen/signal.rb
Overview
Sidekiq worker to accept operational signals and commands through the queue.
Instance Method Summary collapse
-
#perform(signal, expires_at = nil) ⇒ Object
Send a signal to the Chutzen process.
Instance Method Details
#perform(signal, expires_at = nil) ⇒ Object
Send a signal to the Chutzen process.
Signal names
-
stopstops the current process from accepting new jobs
22 23 24 25 26 27 28 |
# File 'lib/chutzen/signal.rb', line 22 def perform(signal, expires_at = nil) if fresh?(expires_at) perform_signal(signal) else Sidekiq.logger.info("Ignoring signal `#{signal}' because it expired at #{expires_at}.") end end |