mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Add "quiet" label to UI when process is quieted"
This commit is contained in:
parent
ee8d958a6b
commit
0c6466ef10
3 changed files with 11 additions and 1 deletions
|
@ -738,6 +738,10 @@ module Sidekiq
|
|||
def dump_threads
|
||||
signal('TTIN')
|
||||
end
|
||||
|
||||
def stopping?
|
||||
self['stopping']
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ module Sidekiq
|
|||
'queues' => @options[:queues].uniq,
|
||||
'labels' => @options[:labels],
|
||||
'identity' => k,
|
||||
'stopping' => @done
|
||||
}
|
||||
# this data doesn't change so dump it to a string
|
||||
# now so we don't need to dump it every heartbeat.
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
<% process.labels.each do |label| %>
|
||||
<span class="label label-info"><%= label %></span>
|
||||
<% end %>
|
||||
<% if process.stopping? %>
|
||||
<span class="label label-danger">Quiet</span>
|
||||
<% end %>
|
||||
<br>
|
||||
<b><%= "#{t('Queues')}: " %></b>
|
||||
<%= process['queues'] * ", " %>
|
||||
|
@ -42,7 +45,9 @@
|
|||
<form method="POST">
|
||||
<%= csrf_tag %>
|
||||
<input type="hidden" name="identity" value="<%= process['identity'] %>"/>
|
||||
<button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
|
||||
<% unless process.stopping? %>
|
||||
<button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
|
||||
<% end %>
|
||||
<button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue