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

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



130
131
132
# File 'lib/sidekiq/fetch.rb', line 130

def message
  @message
end

#queueObject

Returns the value of attribute queue

Returns:

  • (Object)

    the current value of queue



130
131
132
# File 'lib/sidekiq/fetch.rb', line 130

def queue
  @queue
end

Instance Method Details

#acknowledgeObject



131
132
133
# File 'lib/sidekiq/fetch.rb', line 131

def acknowledge
  # nothing to do
end

#queue_nameObject



135
136
137
# File 'lib/sidekiq/fetch.rb', line 135

def queue_name
  queue.gsub(/.*queue:/, '')
end

#requeueObject



139
140
141
142
143
# File 'lib/sidekiq/fetch.rb', line 139

def requeue
  Sidekiq.redis do |conn|
    conn.rpush("queue:#{queue_name}", message)
  end
end