diff --git a/src/WP_Queue/Connections/DatabaseConnection.php b/src/WP_Queue/Connections/DatabaseConnection.php index f072bcb..7742410 100644 --- a/src/WP_Queue/Connections/DatabaseConnection.php +++ b/src/WP_Queue/Connections/DatabaseConnection.php @@ -68,7 +68,7 @@ public function pop() { SELECT * FROM {$this->jobs_table} WHERE reserved_at IS NULL AND available_at <= %s - ORDER BY available_at + ORDER BY available_at, id LIMIT 1 ", $this->datetime() );