<% highlight = local_assigns[:highlight] || local_assigns[:highlight_ids]&.include?(job.id) %> " data-href="<%= job_path(job) %>"> <%= job.id %> <% if job.arguments["executions"] > 0 %> (x<%= job.arguments["executions"] + 1 %>) <% end %> <%= job_status_badge(job.status) %> <% if job.class_name == SolidQueueDashboard::Job::COMMAND_CLASS_NAME %> <%= truncate(job.arguments["arguments"][0], length: 50) %>
Recurring Command <% else %>

<%= job.class_name %>

<% if job.arguments["arguments"].present? %>

<% job.arguments["arguments"].each do |argument| %> <%= truncate(JSON.pretty_generate(argument), length: 80) %> <% end %>

<% end %> <% end %> <%= job.queue_name.titleize %> <%= tag.span job.scheduled_at, data: { date: true }, class: "font-medium" %>
<%= time_ago_in_words(job.scheduled_at, include_seconds: true) %> ago <% if job.success? || job.retried? %>

<%= job.retried? ? "Failed" : "Finished" %> at <%= job.finished_at %>
<%= time_ago_in_words(job.scheduled_at, include_seconds: true) %> ago

<% elsif job.failed? %>

<%= icon_triangle_alert class: "inline-block size-4 text-red-600 dark:text-red-500 -translate-y-px mr-0.5" %> <%= job.error_message %>

<%= form_with url: retry_job_path(job), method: :post do %> <% end %>
<% elsif job.pending? %>

Pending for <%= time_ago_in_words(job.scheduled_at, include_seconds: true) %>

<% end %>