allow custom actions to be handled by scheduler

This commit is contained in:
Oliver Gorwits
2017-12-17 20:14:21 +00:00
parent c8806beaca
commit 8d6bfcf0b2

View File

@@ -87,12 +87,10 @@ sub jq_getsome {
my $hiprio = $jobs->search({
%jobsearch,
-or => [{
username => { '!=' => undef },
action => { -in => setting('job_prio')->{'normal'} },
},{
action => { -in => setting('job_prio')->{'high'} },
}],
-or => [
{ username => { '!=' => undef } },
{ action => { -in => setting('job_prio')->{'high'} } },
],
}, {
%randoms,
'+select' => [\'100 as job_priority'], '+as' => ['me.job_priority'],
@@ -100,7 +98,7 @@ sub jq_getsome {
my $loprio = $jobs->search({
%jobsearch,
action => { -in => setting('job_prio')->{'normal'} },
action => { -not_in => setting('job_prio')->{'high'} },
}, {
%randoms,
'+select' => [\'0 as job_priority'], '+as' => ['me.job_priority'],