Add system checks to dashboard in admin UI (#15989)
This commit is contained in:
parent
82cce18227
commit
487e37d6d4
10 changed files with 152 additions and 7 deletions
|
@ -3,13 +3,8 @@ require 'sidekiq/api'
|
|||
|
||||
module Admin
|
||||
class DashboardController < BaseController
|
||||
SIDEKIQ_QUEUES = %w(default push mailers pull scheduler).freeze
|
||||
|
||||
def index
|
||||
missing_queues = Sidekiq::ProcessSet.new.reduce(SIDEKIQ_QUEUES) { |queues, process| queues - process['queues'] }
|
||||
|
||||
flash.now[:alert] = I18n.t('admin.dashboard.misconfigured_sidekiq_alert', queues: missing_queues.join(', ')) unless missing_queues.empty?
|
||||
|
||||
@system_checks = Admin::SystemCheck.perform
|
||||
@users_count = User.count
|
||||
@pending_users_count = User.pending.count
|
||||
@registrations_week = Redis.current.get("activity:accounts:local:#{current_week}") || 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue