#586 do not show poller performance rows for still running jobs
This commit is contained in:
@@ -10,13 +10,21 @@ __PACKAGE__->table_class('DBIx::Class::ResultSource::View');
|
|||||||
__PACKAGE__->table('poller_performance');
|
__PACKAGE__->table('poller_performance');
|
||||||
__PACKAGE__->result_source_instance->is_virtual(1);
|
__PACKAGE__->result_source_instance->is_virtual(1);
|
||||||
__PACKAGE__->result_source_instance->view_definition(<<ENDSQL
|
__PACKAGE__->result_source_instance->view_definition(<<ENDSQL
|
||||||
SELECT action, entered, to_char( entered, 'YYYY-MM-DD HH24:MI:SS' ) AS entered_stamp,
|
SELECT action,
|
||||||
COUNT( device ) AS number, MIN( started ) AS start, MAX( finished ) AS end,
|
entered,
|
||||||
justify_interval( extract ( epoch FROM( max( finished ) - min( started ) ) ) * interval '1 second' ) AS elapsed
|
to_char( entered, 'YYYY-MM-DD HH24:MI:SS' ) AS entered_stamp,
|
||||||
|
COUNT( device ) AS number,
|
||||||
|
MIN( started ) AS start,
|
||||||
|
MAX( finished ) AS end,
|
||||||
|
justify_interval(
|
||||||
|
extract ( epoch FROM( max( finished ) - min( started ) ) )
|
||||||
|
* interval '1 second'
|
||||||
|
) AS elapsed
|
||||||
FROM admin
|
FROM admin
|
||||||
WHERE action IN ( 'discover', 'macsuck', 'arpnip', 'nbtstat' )
|
WHERE action IN ( 'discover', 'macsuck', 'arpnip', 'nbtstat' )
|
||||||
GROUP BY action, entered
|
GROUP BY action, entered
|
||||||
HAVING count( device ) > 1
|
HAVING count( device ) > 1
|
||||||
|
AND SUM( CASE WHEN status LIKE 'queued%' THEN 1 ELSE 0 END ) = 0
|
||||||
ORDER BY entered DESC, elapsed DESC
|
ORDER BY entered DESC, elapsed DESC
|
||||||
LIMIT 30
|
LIMIT 30
|
||||||
ENDSQL
|
ENDSQL
|
||||||
|
|||||||
Reference in New Issue
Block a user