Module: OmniKiq

Defined in:
lib/omnikiq.rb,
lib/omnikiq/configuration.rb,
lib/omnikiq/trackers/base.rb,
lib/omnikiq/trackers/mixpanel_alias.rb,
lib/omnikiq/trackers/mixpanel_events.rb,
lib/omnikiq/trackers/mixpanel_people.rb,
lib/omnikiq/workers/send_scheduled_sms_worker.rb

Defined Under Namespace

Modules: Trackers, Workers Classes: Configuration

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



23
24
25
26
27
28
# File 'lib/omnikiq.rb', line 23

def self.configuration
  @configuration ||= begin
                      config = OmniKiq::Configuration.new
                      config
                    end
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



30
31
32
33
# File 'lib/omnikiq.rb', line 30

def self.configure
  yield configuration if block_given?
  configure_client
end

.configure_clientObject



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/omnikiq.rb', line 35

def self.configure_client
  Sidekiq.configure_client do |config|
    config.redis = {
      url: OmniKiq.configuration.redis_url,
      namespace: OmniKiq.configuration.redis_namespace,
      size: 10
    }
  end

  enable_testing if OmniKiq.configuration.test_mode
end