diff options
author | Robert Speicher <robert@gitlab.com> | 2016-11-23 09:06:43 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-11-23 09:06:43 +0300 |
commit | d0c0c75ca9568bc3ec00c341a6053623d85e6201 (patch) | |
tree | d94110f64ff25f0eb170f744449d24e8906306f6 /app | |
parent | 536ec509d57705e7e62518dfba82e5727499bc8a (diff) | |
parent | 40822b618576f06098f3f61cc5e11a29d656619e (diff) |
Merge branch 'fix_sidekiq_stats_in_admin_area' into 'master'
Fix Sidekiq stats in admin area
Closes #23825, #24675
See merge request !7654
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/sidekiq_helper.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/helpers/sidekiq_helper.rb b/app/helpers/sidekiq_helper.rb index 56749d80bd3..b5017080cfb 100644 --- a/app/helpers/sidekiq_helper.rb +++ b/app/helpers/sidekiq_helper.rb @@ -5,15 +5,11 @@ module SidekiqHelper (?<mem>[\d\.,]+)\s+ (?<state>[DRSTWXZNLsl\+<]+)\s+ (?<start>.+)\s+ - (?<command>sidekiq.*\])\s* + (?<command>sidekiq.*\]) \z/x def parse_sidekiq_ps(line) - match = line.match(SIDEKIQ_PS_REGEXP) - if match - match[1..6] - else - %w[? ? ? ? ? ?] - end + match = line.strip.match(SIDEKIQ_PS_REGEXP) + match ? match[1..6] : Array.new(6, '?') end end |