Module: Sidekiq::Hol::Worker::ClassMethods

Defined in:
lib/sidekiq/hol/worker.rb

Instance Method Summary collapse

Instance Method Details

#client_hol_push(item) ⇒ Object



16
17
18
19
# File 'lib/sidekiq/hol/worker.rb', line 16

def client_hol_push(item)
  pool = Thread.current[:sidekiq_via_pool] || get_sidekiq_options['pool'] || Sidekiq.redis_pool
  Sidekiq::Hol::Client.new(pool).hol_push(item.stringify_keys)
end

#perform_hol_async(*args) ⇒ Object



12
13
14
# File 'lib/sidekiq/hol/worker.rb', line 12

def perform_hol_async(*args)
  client_hol_push('class' => self, 'args' => args)
end