Module: Push::Daemon
- Defined in:
- lib/push/daemon.rb,
lib/push/daemon/app.rb,
lib/push/daemon/feeder.rb,
lib/push/daemon/logger.rb,
lib/push/daemon/feedback.rb,
lib/push/daemon/delivery_queue.rb,
lib/push/daemon/connection_pool.rb,
lib/push/daemon/delivery_handler.rb,
lib/push/daemon/interruptible_sleep.rb,
lib/push/daemon/database_reconnectable.rb,
lib/push/daemon/feedback/feedback_feeder.rb,
lib/push/daemon/feedback/feedback_handler.rb
Defined Under Namespace
Modules: DatabaseReconnectable, Feedback, InterruptibleSleep Classes: App, ConnectionPool, DeliveryHandler, DeliveryQueue, Feeder, Logger
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
19 20 21 |
# File 'lib/push/daemon.rb', line 19 def config @config end |
.logger ⇒ Object
Returns the value of attribute logger.
19 20 21 |
# File 'lib/push/daemon.rb', line 19 def logger @logger end |
Class Method Details
.start(config) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/push/daemon.rb', line 22 def self.start(config) self.config = config self.logger = Logger.new(:foreground => config.foreground, :error_notification => config.error_notification) setup_signal_hooks daemonize unless config.foreground write_pid_file App.load App.start Feedback.load(config) Feedback.start rescale_poolsize(App.database_connections + Feedback.database_connections) logger.info('[Daemon] Ready') Feeder.start(config) end |