Add batch link, closes #5623

This commit is contained in:
Mike Perham 2022-11-06 14:45:27 -08:00
parent 407d90d7ea
commit 8e75afc0dc
No known key found for this signature in database
3 changed files with 17 additions and 0 deletions

View File

@ -2,6 +2,11 @@
[Sidekiq Changes](https://github.com/mperham/sidekiq/blob/main/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/main/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/main/Ent-Changes.md)
HEAD
----------
- Add BID link on job_info page if job is part of a Batch [#5623]
7.0.1
----------

View File

@ -418,6 +418,10 @@ module Sidekiq
self["jid"]
end
def bid
self["bid"]
end
def enqueued_at
self["enqueued_at"] ? Time.at(self["enqueued_at"]).utc : nil
end

View File

@ -33,6 +33,14 @@
<code><%= job.jid %></code>
</td>
</tr>
<% if job.bid %>
<tr>
<th>BID</th>
<td>
<a href="<%= root_path %>batches/<%= job.bid %>"><%= job.bid %>
</td>
</tr>
<% end %>
<tr>
<th><%= t('CreatedAt') %></th>
<td><%= relative_time(job.created_at) %></td>