Commit 76c7b83d authored by Pascal Betz's avatar Pascal Betz

Remove original regexp

parent d027ed71
module SidekiqHelper module SidekiqHelper
SIDEKIQ_PS_REGEXP = /\A([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+(.+)\s+(sidekiq.*\])\s+\z/
SIDEKIQ_PS_REGEXP = /\A SIDEKIQ_PS_REGEXP = /\A
(?<pid>\d+)\s+ (?<pid>\d+)\s+
(?<cpu>[\d\.,]+)\s+ (?<cpu>[\d\.,]+)\s+
(?<mem>[\d\.,]+)\s+ (?<mem>[\d\.,]+)\s+
(?<state>[DRSTWXZNLsl\+<]+)\s+ (?<state>[DRSTWXZNLsl\+<]+)\s+
(?<start>.+)\s+ (?<start>.+)\s+
(?<command>sidekiq.*\])\s+ (?<command>sidekiq.*\])\s+
\z/x \z/x
def parse_sidekiq_ps(line) def parse_sidekiq_ps(line)
match = line.match(SIDEKIQ_PS_REGEXP) match = line.match(SIDEKIQ_PS_REGEXP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment