refactor: track import progress per film instead of per batch
Replace batch-level progress (processedBatches/totalBatches) with film-level progress (processedFilms/totalFilms) for smoother UI updates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,10 +18,10 @@ class ImportRepository extends ServiceEntityRepository
|
||||
parent::__construct($registry, Import::class);
|
||||
}
|
||||
|
||||
public function incrementProcessedBatches(Import $import): int
|
||||
public function incrementProcessedFilms(Import $import): int
|
||||
{
|
||||
return (int) $this->getEntityManager()->getConnection()->fetchOne(
|
||||
'UPDATE import SET processed_batches = processed_batches + 1 WHERE id = :id RETURNING processed_batches',
|
||||
'UPDATE import SET processed_films = processed_films + 1 WHERE id = :id RETURNING processed_films',
|
||||
['id' => $import->getId()]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user