filtered web queue (#1113)

implements #969 partially
This commit is contained in:
Oliver Gorwits
2023-10-24 18:29:48 +01:00
committed by GitHub
parent 6339017c7a
commit b1e253465a
10 changed files with 297 additions and 30 deletions

View File

@@ -155,4 +155,12 @@ between the date stamp and time stamp. That is:
sub finished_stamp { return (shift)->get_column('finished_stamp') }
=head2 duration
Difference between started and finished.
=cut
sub duration { return (shift)->get_column('duration') }
1;

View File

@@ -46,6 +46,8 @@ will add the following additional synthesized columns to the result set:
=item finished_stamp
=item duration
=back
=cut
@@ -58,9 +60,10 @@ sub with_times {
->search({},
{
'+columns' => {
entered_stamp => \"to_char(entered, 'YYYY-MM-DD HH24:MI')",
started_stamp => \"to_char(started, 'YYYY-MM-DD HH24:MI')",
finished_stamp => \"to_char(finished, 'YYYY-MM-DD HH24:MI')",
entered_stamp => \"to_char(entered, 'YYYY-MM-DD HH24:MI:SS')",
started_stamp => \"to_char(started, 'YYYY-MM-DD HH24:MI:SS')",
finished_stamp => \"to_char(finished, 'YYYY-MM-DD HH24:MI:SS')",
duration => \"justify_interval(extract(epoch FROM (finished - started)) * interval '1 second')",
},
});
}