Class: RushJobMongoid::DashboardController

Inherits:
ApplicationController show all
Includes:
SettingsHelper
Defined in:
app/controllers/rush_job_mongoid/dashboard_controller.rb

Instance Method Summary collapse

Methods included from SettingsHelper

#current_theme, #editing_enabled?, #invert_theme, #queue_groups_enabled?

Instance Method Details

#destroyObject



16
17
18
19
20
21
# File 'app/controllers/rush_job_mongoid/dashboard_controller.rb', line 16

def destroy
  RushJob.clear_queue(queue_params[:queue], queue_params[:priority])

  flash[:success] = t(:cleared_queue, queue: params[:queue])
  redirect_to root_path, status: :see_other
end

#indexObject



5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/rush_job_mongoid/dashboard_controller.rb', line 5

def index
  @locked_jobs_presenter = PaginationPresenter.new(params[:locked_jobs_page])
  @locked_jobs = LockedJobs.new(filter_params)
  @queues_presenter = QueueGroupsPresenter.new(params[:queue_groups_page]) if queue_groups_enabled?

  respond_to do |format|
    format.html
    format.turbo_stream
  end
end