Class: SolidQueueInterface::QueuesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/solid_queue_interface/queues_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
# File 'app/controllers/solid_queue_interface/queues_controller.rb', line 3

def index
  @queues = SolidQueue::Queue.all
end

#pauseObject



11
12
13
14
15
# File 'app/controllers/solid_queue_interface/queues_controller.rb', line 11

def pause
  @queue = SolidQueue::Queue.find_by_name(params[:queue_name])
  @queue.pause
  redirect_to solid_queue_interface_queues_path, notice: "Successfully paused queue: #{params[:queue_name]}"
end

#pausedObject



7
8
9
# File 'app/controllers/solid_queue_interface/queues_controller.rb', line 7

def paused
  @queues = SolidQueue::Pause.all
end

#resumeObject



17
18
19
20
21
# File 'app/controllers/solid_queue_interface/queues_controller.rb', line 17

def resume
  @queue = SolidQueue::Queue.find_by_name(params[:queue_name])
  @queue.resume
  redirect_to solid_queue_interface_queues_path, notice: "Successfully resumed queue: #{params[:queue_name]}"
end