From 087ca8e33c07b2c3395ef41501ff66a393834948 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 27 May 2019 14:23:09 +0100 Subject: [PATCH] #586 do not show poller performance rows for still running jobs --- .../DB/Result/Virtual/PollerPerformance.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/App/Netdisco/DB/Result/Virtual/PollerPerformance.pm b/lib/App/Netdisco/DB/Result/Virtual/PollerPerformance.pm index 1f023bbe..600c23f1 100644 --- a/lib/App/Netdisco/DB/Result/Virtual/PollerPerformance.pm +++ b/lib/App/Netdisco/DB/Result/Virtual/PollerPerformance.pm @@ -10,13 +10,21 @@ __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); __PACKAGE__->table('poller_performance'); __PACKAGE__->result_source_instance->is_virtual(1); __PACKAGE__->result_source_instance->view_definition(< 1 + HAVING count( device ) > 1 + AND SUM( CASE WHEN status LIKE 'queued%' THEN 1 ELSE 0 END ) = 0 ORDER BY entered DESC, elapsed DESC LIMIT 30 ENDSQL