class Nightwing::Sidekiq::Base
Attributes
logger[R]
namespace[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/nightwing/sidekiq/base.rb, line 11 def initialize(options = {}) @namespace = options.fetch(:namespace, "sidekiq") @client = options.fetch(:client, Nightwing.client) @logger = options.fetch(:logger, Nightwing::Logger.new) @debug = options.fetch(:debug, false) end
Public Instance Methods
client()
click to toggle source
# File lib/nightwing/sidekiq/base.rb, line 18 def client @client_proxy ||= begin if @debug Nightwing::ClientLogger.new(client: @client, logger: @logger) else @client end end end
Private Instance Methods
metrics()
click to toggle source
# File lib/nightwing/sidekiq/base.rb, line 30 def metrics @_metrics ||= Nightwing::Metric.new(namespace) end