Class: HerdstWorker::Signals::Facade
- Inherits:
-
Object
- Object
- HerdstWorker::Signals::Facade
- Defined in:
- lib/herdst_worker/signals/facade.rb
Class Method Summary collapse
Class Method Details
.listen(process_path) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/herdst_worker/signals/facade.rb', line 5 def self.listen(process_path) write_process_file(process_path) # Start Signal.trap "USR1" do |x| HerdstWorker::Queue::Facade.start end # Halt Signal.trap "USR2" do |x| HerdstWorker::Queue::Facade.halt end # Stop (abort) Signal.trap "ABRT" do |x| HerdstWorker::Queue::Facade.stop end end |