Class: Emque::Consuming::Status
- Inherits:
-
Object
- Object
- Emque::Consuming::Status
- Includes:
- Helpers
- Defined in:
- lib/emque/consuming/status.rb
Instance Method Summary collapse
- #to_hsh ⇒ Object (also: #to_h)
Instance Method Details
#to_hsh ⇒ Object Also known as: to_h
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/emque/consuming/status.rb', line 6 def to_hsh { :app => config.app_name, :errors => { :count => app.error_tracker.count, :expire_after => app.error_tracker.expiration, :limit => app.error_tracker.limit }, :workers => {}.tap { |worker_stats| app.manager.workers.each { |topic, workers| worker_stats[topic] = { :count => workers.size } } } } end |