jobs: include job duration and queue delay on /jobs page.

This commit is contained in:
evazion
2022-11-30 17:55:39 -06:00
parent a07e6667b4
commit ca0a4af455
4 changed files with 30 additions and 1 deletions

View File

@@ -62,5 +62,13 @@ class BackgroundJob < GoodJob::Job
def pretty_name
job_class.titleize.delete_suffix(" Job")
end
def job_duration
finished_at - performed_at if finished_at
end
def queue_delay
performed_at - created_at if performed_at
end
end
end