diff options
author | Phil Hughes <me@iamphill.com> | 2016-11-24 11:32:59 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-11-24 11:32:59 +0000 |
commit | 8c4f4afd6dd6d382aab2d6b992b6ffe3e60f91af (patch) | |
tree | 37d3ff76dc31e7fcfa63eb8c2f54c9d84eb9b88a /app/helpers/sidekiq_helper.rb | |
parent | 03a235783f697572fe201332cb82746401a01daf (diff) | |
parent | 3e44ed3e2bf75bb14a2d8b0466b3d92afd0ea067 (diff) | |
download | gitlab-ce-autocomplete-space-prefix.tar.gz |
Merge branch 'master' into autocomplete-space-prefixautocomplete-space-prefix
Diffstat (limited to 'app/helpers/sidekiq_helper.rb')
-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 |