1
0
Fork 0
mirror of https://github.com/endofunky/sidetiq.git synced 2022-11-09 13:53:30 -05:00

Merge pull request #157 from tmartyny/nil-runtime

No method error raising for nil runtime
This commit is contained in:
Tobias Svensson 2016-08-15 09:05:53 +01:00 committed by GitHub
commit 8e152347c0

View file

@ -23,10 +23,11 @@
<% @history.each do |entry| %>
<% entry = Sidekiq.load_json(entry).symbolize_keys %>
<% runtime = entry[:runtime]&.round(3) || "N/A" %>
<tr class="<%= 'error' if entry[:status] == 'failure' %>">
<td><%= entry[:status].capitalize %></td>
<td><%= Time.parse(entry[:timestamp]).strftime("%m/%d/%Y %I:%M:%S%p") %></td>
<td><%= entry[:runtime].round(3) %> s</td>
<td><%= runtime %> s</td>
<td>
<% if entry[:status] == 'failure' %>
<a class="backtrace" href="#" onclick="$(this).next().toggle(); return false">