Class: Mole::Transport::Sidekiq

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/orwell/mole/transport/sidekiq.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Sidekiq

Returns a new instance of Sidekiq.



10
11
12
# File 'lib/orwell/mole/transport/sidekiq.rb', line 10

def initialize(opts = {})
  @request_options = opts
end

Instance Attribute Details

#request_optionsObject (readonly)

Returns the value of attribute request_options.



8
9
10
# File 'lib/orwell/mole/transport/sidekiq.rb', line 8

def request_options
  @request_options
end

Class Method Details

.perform_http(event, opts) ⇒ Object



18
19
20
# File 'lib/orwell/mole/transport/sidekiq.rb', line 18

def self.perform_http(event, opts)
  BasicHttp.new(opts).perform(event)
end

Instance Method Details

#perform(event) ⇒ Object



14
15
16
# File 'lib/orwell/mole/transport/sidekiq.rb', line 14

def perform(event)
  Sidekiq.delay.perform_http(event, request_options)
end