move random() in TastyJobs to where it is more useful
This commit is contained in:
@@ -16,8 +16,7 @@ __PACKAGE__->result_source_instance->view_definition(<<ENDSQL
|
||||
ON (ds.backend = ? AND admin.device = ds.device
|
||||
AND admin.action = ANY (ds.actionset))
|
||||
WHERE admin.status = 'queued'
|
||||
AND ds.device IS NULL
|
||||
ORDER BY random())
|
||||
AND ds.device IS NULL)
|
||||
|
||||
SELECT my_jobs.*,
|
||||
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,
|
||||
ds.deferrals ASC NULLS FIRST,
|
||||
ds.last_defer ASC NULLS LAST,
|
||||
device_key DESC NULLS LAST
|
||||
device_key DESC NULLS LAST,
|
||||
random()
|
||||
LIMIT ?
|
||||
ENDSQL
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user