Class: Sidekiq::BasicFetch::UnitOfWork

Inherits:
Struct
  • Object
show all
Defined in:
lib/sidekiq/fetch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config



15
16
17
# File 'lib/sidekiq/fetch.rb', line 15

def config
  @config
end

#jobObject

Returns the value of attribute job



15
16
17
# File 'lib/sidekiq/fetch.rb', line 15

def job
  @job
end

#queueObject

Returns the value of attribute queue



15
16
17
# File 'lib/sidekiq/fetch.rb', line 15

def queue
  @queue
end

Instance Method Details

#acknowledgeObject



16
17
18
# File 'lib/sidekiq/fetch.rb', line 16

def acknowledge
  # nothing to do
end

#queue_nameObject



20
21
22
# File 'lib/sidekiq/fetch.rb', line 20

def queue_name
  queue.delete_prefix("queue:")
end

#requeueObject



24
25
26
27
28
# File 'lib/sidekiq/fetch.rb', line 24

def requeue
  config.redis do |conn|
    conn.rpush(queue, job)
  end
end