Ensure consistend order for tasks with equal timestamp (fixes flaky test)
[MAILPOET-2623]
This commit is contained in:
committed by
Jack Kitterhing
parent
2e7609fca0
commit
de9c151fe4
@@ -51,6 +51,7 @@ class State
|
|||||||
$tasks = [];
|
$tasks = [];
|
||||||
foreach ($statuses as $status) {
|
foreach ($statuses as $status) {
|
||||||
$query = ScheduledTask::orderByDesc('created_at')
|
$query = ScheduledTask::orderByDesc('created_at')
|
||||||
|
->orderByAsc('id') // consistent order for tasks with equal timestamps
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->limit($limit);
|
->limit($limit);
|
||||||
if ($type) {
|
if ($type) {
|
||||||
|
Reference in New Issue
Block a user