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



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

def config
  @config
end

#jobObject

Returns the value of attribute job

Returns:

  • (Object)

    the current value of job



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

def job
  @job
end

#queueObject

Returns the value of attribute queue

Returns:

  • (Object)

    the current value of queue



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

def queue
  @queue
end

Instance Method Details

#acknowledgeObject



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

def acknowledge
  # nothing to do
end

#queue_nameObject



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

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

#requeueObject



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

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