operation = $op; } public function advance(int $count = 1): void { $this->operation->processedItems = min( $this->operation->processedItems + $count, $this->operation->totalItems ); JVB()->queue()->storage()->saveProgress($this->operation); } public function failItem(mixed $item, string $reason): void { $this->operation->failedItems[] = [ 'item' => $item, 'reason' => $reason, ]; JVB()->queue()->storage()->saveProgress($this->operation); } }