Commit 4886d8fd03087ceb07c96c3067120b0c1815354d
1 parent
db7d1549
Exists in
master
and in
4 other branches
Show sidekiq running processes in the background_jobs page.
Showing
1 changed file
with
29 additions
and
0 deletions
Show diff stats
app/views/admin/background_jobs/show.html.haml
@@ -2,3 +2,32 @@ | @@ -2,3 +2,32 @@ | ||
2 | %br | 2 | %br |
3 | .ui-box | 3 | .ui-box |
4 | %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"} | 4 | %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"} |
5 | +%h4 Sidekiq running processes | ||
6 | +- sidekiq_processes = `ps -eo euser,pid,pcpu,pmem,stat,start,command | grep sidekiq | grep -v grep` | ||
7 | +- if sidekiq_processes.empty? | ||
8 | + %b There is no running sidekiq process | ||
9 | +- else | ||
10 | + .ui-box | ||
11 | + %table.zebra-striped | ||
12 | + %thead | ||
13 | + %th USER | ||
14 | + %th | ||
15 | + %th PID | ||
16 | + %th | ||
17 | + %th CPU | ||
18 | + %th | ||
19 | + %th MEM | ||
20 | + %th | ||
21 | + %th STATE | ||
22 | + %th | ||
23 | + %th START | ||
24 | + %th | ||
25 | + %th COMMAND | ||
26 | + %th | ||
27 | + - sidekiq_processes.split("\n").each do |process| | ||
28 | + - data = process.gsub!(/\s+/m, '|').strip.split('|') | ||
29 | + %tr | ||
30 | + - 6.times do | ||
31 | + %td= data.shift | ||
32 | + %td | ||
33 | + %td= data.join(" ") |