Method: Sidekiq::Queue#clear

Defined in:
lib/sidekiq/api.rb

#clearBoolean Also known as: 💣

delete all jobs within this queue

Returns:

  • (Boolean)

    true



331
332
333
334
335
336
337
338
339
# File 'lib/sidekiq/api.rb', line 331

def clear
  Sidekiq.redis do |conn|
    conn.multi do |transaction|
      transaction.unlink(@rname)
      transaction.srem("queues", [name])
    end
  end
  true
end