Show sidekiq running processes in the background_jobs page.
This commit is contained in:
parent
db7d154970
commit
4886d8fd03
1 changed files with 29 additions and 0 deletions
|
@ -2,3 +2,32 @@
|
|||
%br
|
||||
.ui-box
|
||||
%iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"}
|
||||
%h4 Sidekiq running processes
|
||||
- sidekiq_processes = `ps -eo euser,pid,pcpu,pmem,stat,start,command | grep sidekiq | grep -v grep`
|
||||
- if sidekiq_processes.empty?
|
||||
%b There is no running sidekiq process
|
||||
- else
|
||||
.ui-box
|
||||
%table.zebra-striped
|
||||
%thead
|
||||
%th USER
|
||||
%th
|
||||
%th PID
|
||||
%th
|
||||
%th CPU
|
||||
%th
|
||||
%th MEM
|
||||
%th
|
||||
%th STATE
|
||||
%th
|
||||
%th START
|
||||
%th
|
||||
%th COMMAND
|
||||
%th
|
||||
- sidekiq_processes.split("\n").each do |process|
|
||||
- data = process.gsub!(/\s+/m, '|').strip.split('|')
|
||||
%tr
|
||||
- 6.times do
|
||||
%td= data.shift
|
||||
%td
|
||||
%td= data.join(" ")
|
||||
|
|
Loading…
Reference in a new issue