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

Returns:

  • (Object)

    the current value of config



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

def config
  @config
end

#jobObject

Returns the value of attribute job

Returns:

  • (Object)

    the current value of job



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

def job
  @job
end

#queueObject

Returns the value of attribute queue

Returns:

  • (Object)

    the current value of queue



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

def queue
  @queue
end

Instance Method Details

#acknowledgeObject



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

def acknowledge
  # nothing to do
end

#queue_nameObject



18
19
20
# File 'lib/sidekiq/fetch.rb', line 18

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

#requeueObject



22
23
24
25
26
# File 'lib/sidekiq/fetch.rb', line 22

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