diff --git a/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/lib/App/Netdisco/JobQueue/PostgreSQL.pm index 7cd3c9ff..0b04a3d8 100644 --- a/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -270,7 +270,9 @@ sub jq_complete { } sub jq_log { - return schema('netdisco')->resultset('Admin')->search({}, { + return schema('netdisco')->resultset('Admin')->search({ + 'me.log' => { '-not_like' => 'duplicate of %' }, + }, { prefetch => 'target', order_by => { -desc => [qw/entered device action/] }, rows => (setting('jobs_qdepth') || 50), @@ -281,6 +283,7 @@ sub jq_userlog { my $user = shift; return schema('netdisco')->resultset('Admin')->search({ username => $user, + log => { '-not_like' => 'duplicate of %' }, finished => { '>' => \"(now() - interval '5 seconds')" }, })->with_times->all; }