try to make highest job ID win when removing duplicates

This commit is contained in:
Oliver Gorwits
2022-08-10 16:15:19 -04:00
parent d403b11beb
commit e5fe5c909e

View File

@@ -159,10 +159,11 @@ sub jq_getsome {
-and => [
%job_properties,
-or => [{
job => { '!=' => $job->id },
job => { '<' => $job->id },
},{
job => $job->id,
-exists => $jobs->search({
job => { '>' => $job->id },
status => { -like => 'queued-%' },
started => \[q/> (now() - ?::interval)/, setting('jobs_stale_after')],
%job_properties,