skipover now implicit from deferrals/actionset; fix sql where logic with better correlation

This commit is contained in:
Oliver Gorwits
2017-05-23 17:27:43 +01:00
parent b51edbccd2
commit 4550b8a84c
5 changed files with 40 additions and 17 deletions

View File

@@ -40,10 +40,7 @@ sub _getsome {
my $rs = $jobs->search({
status => 'queued',
device => { '-not_in' => $jobs->correlate('skipped')->search({
backend => $fqdn,
-or => [{ deferrals => { '>=', 10 } },{ '-bool' => 'skipover' }],
}, { columns => 'device' })->as_query },
device => { '-not_in' => $jobs->skipped->columns('device')->as_query },
%$where,
}, { order_by => 'random()', rows => $num_slots });
@@ -130,7 +127,6 @@ sub jq_prime_skiplist {
backend => $fqdn,
device => $_,
actionset => $actionset{$_},
skipover => \'true',
}} keys %actionset
]);
});