Skip to content

Commit

Permalink
Add priority-aware task queue to Scheduler class
Browse files Browse the repository at this point in the history
The fetchTasks() method now uses multi-ordering with priority as the
primary ordering column to make the task queue priority aware.
  • Loading branch information
ditsuke committed Sep 7, 2021
1 parent 0dfaee0 commit 4b25f26
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -218,6 +218,12 @@ public function fetchTasks(array $filters, array $listConfig): array
$model->setState('list.ordering', 'a.next_execution');
$model->setState('list.direction', 'ASC');

$model->setState('list.multi_ordering', [
'a.priority DESC',
'a.next_execution ASC'
]
);

// List options
foreach ($listConfig as $key => $value)
{
Expand Down

0 comments on commit 4b25f26

Please sign in to comment.