From ef3c3cfafaa54b0ea2a8d6fda8727dd0310074d5 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Fri, 9 Jan 2026 13:52:27 +0100 Subject: [PATCH] Fetch samples for newest releases first --- app/Console/Commands/FetchSamples.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/FetchSamples.php b/app/Console/Commands/FetchSamples.php index f3953098d..b1fd82150 100644 --- a/app/Console/Commands/FetchSamples.php +++ b/app/Console/Commands/FetchSamples.php @@ -98,7 +98,8 @@ class FetchSamples extends Command $query = clone $baseQuery; - $query->chunkById($chunkSize, function ($releases) use (&$processed, &$failed, &$remaining, $bar, $showOutput) { + // Use chunkByIdDesc to process newest releases first + $query->chunkByIdDesc($chunkSize, function ($releases) use (&$processed, &$failed, &$remaining, $bar, $showOutput) { foreach ($releases as $release) { if ($remaining <= 0) { return false; // stop chunking