mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
add back the warning based on Sidekiq queue size, but only when the queue size is 100k or more
This commit is contained in:
@ -37,7 +37,7 @@ class AdminDashboardData
|
||||
ruby_version_check,
|
||||
host_names_check,
|
||||
gc_checks,
|
||||
sidekiq_check,
|
||||
sidekiq_check || queue_size_check,
|
||||
ram_check,
|
||||
google_oauth2_config_check,
|
||||
facebook_config_check,
|
||||
@ -109,6 +109,11 @@ class AdminDashboardData
|
||||
I18n.t('dashboard.sidekiq_warning') if Jobs.queued > 0 and (last_job_performed_at.nil? or last_job_performed_at < 2.minutes.ago)
|
||||
end
|
||||
|
||||
def queue_size_check
|
||||
queue_size = Jobs.queued
|
||||
I18n.t('dashboard.queue_size_warning', queue_size: queue_size) unless queue_size < 100_000
|
||||
end
|
||||
|
||||
def ram_check
|
||||
I18n.t('dashboard.memory_warning') if MemInfo.new.mem_total and MemInfo.new.mem_total < 1_000_000
|
||||
end
|
||||
|
Reference in New Issue
Block a user