Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2021-04-05 14:31:07 +02:00
21 changed files with 191 additions and 47 deletions

View File

@ -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

View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
class HealthController < ActionController::Base
def show
render plain: 'OK'
end
end