tune the job picking sql to avoid user jobs ignoring skips

This commit is contained in:
Oliver Gorwits
2018-02-16 08:18:53 +00:00
parent ed30b37fac
commit 15a38edbc1
2 changed files with 7 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2.039007 - 2018-02-16
[ENHANCEMENTS]
* tune the job picking sql to avoid user jobs ignoring skips
2.039006 - 2018-02-15
[BUG FIXES]

View File

@@ -30,9 +30,8 @@ __PACKAGE__->result_source_instance->view_definition(<<ENDSQL
LEFT OUTER JOIN device_skip ds
ON (ds.backend = ? AND ds.device = my_jobs.device)
WHERE my_jobs.username IS NOT NULL
WHERE ds.deferrals < ?
OR (ds.deferrals IS NULL AND ds.last_defer IS NULL)
OR ds.deferrals < ?
OR ds.last_defer <= ( LOCALTIMESTAMP - ?::interval )
ORDER BY job_priority DESC,