Class: Metricize::Forwarder
- Inherits:
-
Object
- Object
- Metricize::Forwarder
- Includes:
- SharedMethods
- Defined in:
- lib/metricize/forwarder.rb
Instance Method Summary collapse
- #go! ⇒ Object
-
#initialize(options) ⇒ Forwarder
constructor
A new instance of Forwarder.
Methods included from SharedMethods
Constructor Details
#initialize(options) ⇒ Forwarder
Returns a new instance of Forwarder.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/metricize/forwarder.rb', line 5 def initialize() @password = .fetch(:password) @username = .fetch(:username) @remote_url = [:remote_url] || 'metrics-api.librato.com/v1/metrics' @remote_timeout = ([:remote_timeout] || 12).to_i @remote_requests = ([:remote_requests] || 30).to_i @batch_size = ([:batch_size] || 5000).to_i @batch_sleep = ([:batch_sleep] || 1).to_i establish_logger() initialize_redis() end |
Instance Method Details
#go! ⇒ Object
17 18 19 |
# File 'lib/metricize/forwarder.rb', line 17 def go! process_metric_queue end |