Module: Wukong::EventMachineDriver
- Includes:
- DriverMethods
- Defined in:
- lib/wukong/driver/event_machine_driver.rb
Instance Attribute Summary
Attributes included from DriverMethods
Class Method Summary collapse
Methods included from DriverMethods
#construct_dataflow, #finalize, #finalize_and_stop_dataflow, #finalize_dataflow, #process, #send_through_dataflow, #setup, #setup_dataflow, #stop
Class Method Details
.included(klass) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/wukong/driver/event_machine_driver.rb', line 5 def self.included klass klass.class_eval do def self.add_signal_traps Signal.trap('INT') { log.info 'Received SIGINT. Stopping.' ; EM.stop } Signal.trap('TERM') { log.info 'Received SIGTERM. Stopping.' ; EM.stop } end end end |