do not show ignored dupe jobs in job queue

This commit is contained in:
Oliver Gorwits
2019-04-16 17:27:03 +01:00
parent 8f1f35abab
commit 5452eaa539

View File

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