refactor: embed film data directly in batch messages

Avoid re-parsing the entire CSV file in each batch handler by including
the film data in the message payload itself.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
thibaud-leclere
2026-04-01 19:25:45 +02:00
parent 087b063f1f
commit 8c73a22eff
3 changed files with 24 additions and 20 deletions

View File

@@ -6,9 +6,11 @@ namespace App\Message;
readonly class ImportFilmsBatchMessage
{
/**
* @param list<array{name: string, year: int, ltbxdUri: string, date: string}> $films
*/
public function __construct(
public int $importId,
public int $offset,
public int $limit,
public array $films,
) {}
}