mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
2513884aa0
No more massive numbers of Sidekiq::Extensions::DelayedClass jobs! Now you’ll see the underlying Class.method call instead so the UI is much more intuitive. This might also be necessary for ActiveJob.
76 lines
2.5 KiB
Text
76 lines
2.5 KiB
Text
<div class="row header">
|
|
<div class="col-sm-8 pull-left">
|
|
<h3><%= t('Processes') %></h3>
|
|
</div>
|
|
<div class="col-sm-4 pull-right">
|
|
<form method="POST" style="margin-top: 20px; margin-bottom: 10px;">
|
|
<div class="btn-group pull-right">
|
|
<button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('QuietAll') %></button>
|
|
<button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('StopAll') %></button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="processes table table-hover table-bordered table-striped table-white">
|
|
<thead>
|
|
<th><%= t('Name') %></th>
|
|
<th><%= t('Started') %></th>
|
|
<th><%= t('Threads') %></th>
|
|
<th><%= t('Busy') %></th>
|
|
<th> </th>
|
|
</thead>
|
|
<% Sidekiq::ProcessSet.new.each_with_index do |process, index| %>
|
|
<tr>
|
|
<td><%= "#{process['hostname']}:#{process['pid']}" %></td>
|
|
<td><%= relative_time(Time.at(process['started_at'])) %></td>
|
|
<td><%= process['concurrency'] %></td>
|
|
<td><%= process['busy'] %></td>
|
|
<td>
|
|
<div class="btn-group pull-right">
|
|
<form method="POST">
|
|
<input type="hidden" name="hostname" value="<%= process['hostname'] %>"/>
|
|
<input type="hidden" name="pid" value="<%= process['pid'] %>"/>
|
|
<button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
|
|
<button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
|
|
<div class="row header">
|
|
<div class="col-sm-7">
|
|
<h3><%= t('Jobs') %></h3>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="workers table table-hover table-bordered table-striped table-white">
|
|
<thead>
|
|
<th><%= t('Process') %></th>
|
|
<th><%= t('TID') %></th>
|
|
<th><%= t('JID') %></th>
|
|
<th><%= t('Queue') %></th>
|
|
<th><%= t('Job') %></th>
|
|
<th><%= t('Arguments') %></th>
|
|
<th><%= t('Started') %></th>
|
|
</thead>
|
|
<% workers.each_with_index do |(process, thread, msg), index| %>
|
|
<% job = Sidekiq::Job.new(msg['payload']) -%>
|
|
<tr>
|
|
<td><%= process %></td>
|
|
<td><%= thread %></td>
|
|
<td><%= job.jid %></td>
|
|
<td>
|
|
<a href="<%= root_path %>queues/<%= msg['queue'] %>"><%= msg['queue'] %></a>
|
|
</td>
|
|
<td><%= job.display_class %></td>
|
|
<td>
|
|
<div class="args"><%= display_args(job.display_args) %></div>
|
|
</td>
|
|
<td><%= relative_time(Time.at(msg['run_at'])) %></td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|