Class: Banter::Server::SubscriberServer
- Inherits:
-
Object
- Object
- Banter::Server::SubscriberServer
- Includes:
- Celluloid
- Defined in:
- lib/banter/server/subscriber_server.rb
Instance Attribute Summary collapse
-
#banter_worker_id ⇒ Object
readonly
Returns the value of attribute banter_worker_id.
-
#hostname ⇒ Object
readonly
Returns the value of attribute hostname.
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#process_name ⇒ Object
readonly
Returns the value of attribute process_name.
-
#workers ⇒ Object
readonly
Returns the value of attribute workers.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#banter_worker_id ⇒ Object (readonly)
Returns the value of attribute banter_worker_id.
19 20 21 |
# File 'lib/banter/server/subscriber_server.rb', line 19 def banter_worker_id @banter_worker_id end |
#hostname ⇒ Object (readonly)
Returns the value of attribute hostname.
19 20 21 |
# File 'lib/banter/server/subscriber_server.rb', line 19 def hostname @hostname end |
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
19 20 21 |
# File 'lib/banter/server/subscriber_server.rb', line 19 def pid @pid end |
#process_name ⇒ Object (readonly)
Returns the value of attribute process_name.
19 20 21 |
# File 'lib/banter/server/subscriber_server.rb', line 19 def process_name @process_name end |
#workers ⇒ Object (readonly)
Returns the value of attribute workers.
19 20 21 |
# File 'lib/banter/server/subscriber_server.rb', line 19 def workers @workers end |
Class Method Details
.instance ⇒ Object
21 22 23 |
# File 'lib/banter/server/subscriber_server.rb', line 21 def self.instance @instance ||= new end |
Instance Method Details
#set_workers(subscribers) ⇒ Object
25 26 27 |
# File 'lib/banter/server/subscriber_server.rb', line 25 def set_workers(subscribers) @workers = subscribers.map { |subscriber| create_queue_listeners(subscriber) } end |
#start ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/banter/server/subscriber_server.rb', line 29 def start set_information start_workers handle_interrupts handle_teardown ensure stop_worker end |