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

#jobObject

Returns the value of attribute job

Returns:

  • (Object)

    the current value of job



11
12
13
# File 'lib/sidekiq/fetch.rb', line 11

def job
  @job
end

#queueObject

Returns the value of attribute queue

Returns:

  • (Object)

    the current value of queue



11
12
13
# File 'lib/sidekiq/fetch.rb', line 11

def queue
  @queue
end

Instance Method Details

#acknowledgeObject



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

def acknowledge
  # nothing to do
end

#queue_nameObject



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

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

#requeueObject



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

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