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:
@@ -30,15 +30,12 @@ class Import
|
||||
#[ORM\Column(length: 20)]
|
||||
private string $status = self::STATUS_PENDING;
|
||||
|
||||
#[ORM\Column]
|
||||
private int $totalBatches = 0;
|
||||
|
||||
#[ORM\Column]
|
||||
private int $processedBatches = 0;
|
||||
|
||||
#[ORM\Column]
|
||||
private int $totalFilms = 0;
|
||||
|
||||
#[ORM\Column]
|
||||
private int $processedFilms = 0;
|
||||
|
||||
#[ORM\Column]
|
||||
private int $failedFilms = 0;
|
||||
|
||||
@@ -91,25 +88,14 @@ class Import
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTotalBatches(): int
|
||||
public function getProcessedFilms(): int
|
||||
{
|
||||
return $this->totalBatches;
|
||||
return $this->processedFilms;
|
||||
}
|
||||
|
||||
public function setTotalBatches(int $totalBatches): static
|
||||
public function setProcessedFilms(int $processedFilms): static
|
||||
{
|
||||
$this->totalBatches = $totalBatches;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getProcessedBatches(): int
|
||||
{
|
||||
return $this->processedBatches;
|
||||
}
|
||||
|
||||
public function setProcessedBatches(int $processedBatches): static
|
||||
{
|
||||
$this->processedBatches = $processedBatches;
|
||||
$this->processedFilms = $processedFilms;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user