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

allow_in_read_only, guard_in_read_only, #redirect_to, requires_capability

Instance Method Details

#indexObject



5
6
7
8
# File 'app/controllers/roundhouse_ui/workers_controller.rb', line 5

def index
  @processes = backend.process_set.to_a
  @fetch_active = RoundhouseUi::Pause.fetch_installed?
end

#quietObject



10
11
12
13
# File 'app/controllers/roundhouse_ui/workers_controller.rb', line 10

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

#stopObject



15
16
17
18
# File 'app/controllers/roundhouse_ui/workers_controller.rb', line 15

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