better formatting for delayed jobs
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
module DelayedJobsHelper
|
||||
def print_handler(job)
|
||||
case job.name
|
||||
when "Class#expire_cache"
|
||||
"<strong>expire post count cache</strong>: " + job.payload_object.args.flatten.join(" ")
|
||||
|
||||
when "Upload#process!"
|
||||
'<strong>upload post</strong>: <a href="/uploads/' + job.payload_object.object.id.to_s + '">record</a>'
|
||||
|
||||
when "Tag#update_related"
|
||||
"none"
|
||||
"<strong>update related tags</strong>: " + job.payload_object.name
|
||||
|
||||
when "TagAlias#process!"
|
||||
'<strong>alias</strong>: ' + job.payload_object.antecedent_name + " -> " + job.payload_object.consequent_name
|
||||
@@ -13,8 +16,14 @@ module DelayedJobsHelper
|
||||
when "TagImplication#process!"
|
||||
'<strong>implication</strong>: ' + job.payload_object.antecedent_name + " -> " + job.payload_object.consequent_name
|
||||
|
||||
when "TagAlias#clear_cache"
|
||||
"none"
|
||||
when "Class#clear_cache_for"
|
||||
"<strong>expire tag alias cache</strong>: " + job.payload_object.flatten.join(" ")
|
||||
|
||||
when "Tag#update_category_cache"
|
||||
"<strong>update tag category cache</strong>: " + job.payload_object.name
|
||||
|
||||
when "Tag#update_category_post_counts"
|
||||
"<strong>update category post counts</strong>: " + job.payload_object.name
|
||||
|
||||
else
|
||||
job.handler
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<th>Last error</th>
|
||||
<th>Run at</th>
|
||||
<th>Failed at</th>
|
||||
<th>Queue</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -26,6 +27,7 @@
|
||||
<td><%= job.last_error %></td>
|
||||
<td><%= job.run_at %></td>
|
||||
<td><%= job.failed_at %></td>
|
||||
<td><%= job.queue %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user