Class: RoundhouseUi::WorkersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/roundhouse_ui/workers_controller.rb

Overview

The running Sidekiq process fleet, straight from Sidekiq::ProcessSet. "Quiet" stops a process from pulling new work; "Stop" begins shutdown.

Constant Summary

Constants inherited from ApplicationController

ApplicationController::AUDIT_VERBS

Instance Method Summary collapse

Methods inherited from ApplicationController

#redirect_to

Instance Method Details

#indexObject



7
8
9
10
# File 'app/controllers/roundhouse_ui/workers_controller.rb', line 7

def index
  @processes = Sidekiq::ProcessSet.new.to_a
  @fetch_active = RoundhouseUi::Pause.fetch_installed?
end

#quietObject



12
13
14
15
# File 'app/controllers/roundhouse_ui/workers_controller.rb', line 12

def quiet
  find_process(params[:identity])&.quiet!
  redirect_to workers_path, notice: "Sent quiet to #{params[:identity]}."
end

#stopObject



17
18
19
20
# File 'app/controllers/roundhouse_ui/workers_controller.rb', line 17

def stop
  find_process(params[:identity])&.stop!
  redirect_to workers_path, notice: "Sent stop to #{params[:identity]}."
end