move random() in TastyJobs to where it is more useful
This commit is contained in:
1
Changes
1
Changes
@@ -8,6 +8,7 @@
|
|||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
* avoid skips that go twice past max_deferrals not being reduced
|
* avoid skips that go twice past max_deferrals not being reduced
|
||||||
|
* move random() in TastyJobs to where it is more useful
|
||||||
|
|
||||||
2.039010 - 2018-02-22
|
2.039010 - 2018-02-22
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ __PACKAGE__->result_source_instance->view_definition(<<ENDSQL
|
|||||||
ON (ds.backend = ? AND admin.device = ds.device
|
ON (ds.backend = ? AND admin.device = ds.device
|
||||||
AND admin.action = ANY (ds.actionset))
|
AND admin.action = ANY (ds.actionset))
|
||||||
WHERE admin.status = 'queued'
|
WHERE admin.status = 'queued'
|
||||||
AND ds.device IS NULL
|
AND ds.device IS NULL)
|
||||||
ORDER BY random())
|
|
||||||
|
|
||||||
SELECT my_jobs.*,
|
SELECT my_jobs.*,
|
||||||
CASE WHEN (my_jobs.username IS NOT NULL OR
|
CASE WHEN (my_jobs.username IS NOT NULL OR
|
||||||
@@ -37,7 +36,8 @@ __PACKAGE__->result_source_instance->view_definition(<<ENDSQL
|
|||||||
ORDER BY job_priority DESC,
|
ORDER BY job_priority DESC,
|
||||||
ds.deferrals ASC NULLS FIRST,
|
ds.deferrals ASC NULLS FIRST,
|
||||||
ds.last_defer ASC NULLS LAST,
|
ds.last_defer ASC NULLS LAST,
|
||||||
device_key DESC NULLS LAST
|
device_key DESC NULLS LAST,
|
||||||
|
random()
|
||||||
LIMIT ?
|
LIMIT ?
|
||||||
ENDSQL
|
ENDSQL
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user