Class: Daemon
- Inherits:
-
Object
- Object
- Daemon
- Defined in:
- lib/ShrubService.rb
Instance Method Summary collapse
- #service_init ⇒ Object
- #service_main ⇒ Object
- #service_pause ⇒ Object
- #service_resume ⇒ Object
- #service_shutdown ⇒ Object
- #service_stop ⇒ Object
Instance Method Details
#service_init ⇒ Object
23 24 |
# File 'lib/ShrubService.rb', line 23 def service_init end |
#service_main ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ShrubService.rb', line 12 def service_main sleep 3 DRb.start_service('druby://0.0.0.0:12000', Shrub::CodeRunner.new(ARGV[0])) DRb.thread.join end |
#service_pause ⇒ Object
26 27 |
# File 'lib/ShrubService.rb', line 26 def service_pause end |
#service_resume ⇒ Object
29 30 |
# File 'lib/ShrubService.rb', line 29 def service_resume end |
#service_shutdown ⇒ Object
32 33 34 |
# File 'lib/ShrubService.rb', line 32 def service_shutdown DRb.stop_service end |
#service_stop ⇒ Object
19 20 21 |
# File 'lib/ShrubService.rb', line 19 def service_stop DRb.stop_service end |