Class: WarouzServer::Master
- Inherits:
-
Object
- Object
- WarouzServer::Master
- Includes:
- Singleton, MysqlManager, WorkerManager
- Defined in:
- lib/warouz_server/master.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
Returns the value of attribute events.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
Methods included from MysqlManager
Methods included from WorkerManager
#start_workers, #stop_worker_threads
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events.
6 7 8 |
# File 'lib/warouz_server/master.rb', line 6 def events @events end |
#logger ⇒ Object
Returns the value of attribute logger.
6 7 8 |
# File 'lib/warouz_server/master.rb', line 6 def logger @logger end |
Instance Method Details
#start ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/warouz_server/master.rb', line 8 def start start_workers() start_client_connector() while running sleep(1) end nil end |
#stop ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/warouz_server/master.rb', line 17 def stop return if stopping self.stopping=true self.running=false logger.info("Graceful shutdown...") # Stop DRb stop_client_connector # Stop workers stop_worker_threads nil end |