diff options
-rw-r--r-- | extensions/BMO/lib/Reports.pm | 4 | ||||
-rw-r--r-- | extensions/BMO/template/en/default/pages/email_queue.html.tmpl | 17 |
2 files changed, 18 insertions, 3 deletions
diff --git a/extensions/BMO/lib/Reports.pm b/extensions/BMO/lib/Reports.pm index aa7ca5690..e9e2670b9 100644 --- a/extensions/BMO/lib/Reports.pm +++ b/extensions/BMO/lib/Reports.pm @@ -573,7 +573,8 @@ sub email_queue_report { my $query = " SELECT j.jobid, - j.run_after AS timestamp, + j.insert_time, + j.run_after AS run_time, COUNT(e.jobid) AS error_count, MAX(e.error_time) AS error_time, e.message AS error_message @@ -583,6 +584,7 @@ sub email_queue_report { ORDER BY j.run_after"; $vars->{'jobs'} = $dbh->selectall_arrayref($query, { Slice => {} }); + $vars->{'now'} = (time); } 1; diff --git a/extensions/BMO/template/en/default/pages/email_queue.html.tmpl b/extensions/BMO/template/en/default/pages/email_queue.html.tmpl index 7afd083ac..0e4a37551 100644 --- a/extensions/BMO/template/en/default/pages/email_queue.html.tmpl +++ b/extensions/BMO/template/en/default/pages/email_queue.html.tmpl @@ -17,14 +17,27 @@ <table id="report" cellspacing="0" border="0"> <tr id="report-header"> - <th>Time</th> + <th>Insert Time</th> + <th>Run Time</th> + <th>Age</th> <th>Error Count</th> <th>Last Error</th> <th>Error Message</th> </tr> [% FOREACH job IN jobs %] <tr class="report item [% loop.count % 2 == 1 ? "report_row_odd" : "report_row_even" %]"> - <td nowrap>[% time2str("%Y-%m-%d %H:%M:%S %Z", job.timestamp) FILTER html %]</td> + <td nowrap>[% time2str("%Y-%m-%d %H:%M:%S %Z", job.insert_time) FILTER html %]</td> + <td nowrap>[% time2str("%Y-%m-%d %H:%M:%S %Z", job.run_time) FILTER html %]</td> + <td nowrap> + [% age = now - job.insert_time %] + [% IF age < 60 %] + [% age FILTER none %]s + [% ELSIF age < 60 * 60 %] + [% age / 60 FILTER format('%.0f') %]m + [% ELSE %] + [% age / (60 * 60) FILTER format('%.0f') %]h + [% END %] + </td> <td nowrap>[% job.error_count FILTER html %]</td> <td nowrap> [% IF job.error_count %] |