/** * @throws \RuntimeException */ protected function retry() { $retriesLeft = $this->part->getRetries(); if ($retriesLeft < 1) { throw new \RuntimeException('No more retries left!'); } $this->part->setRetries(--$retriesLeft); $this->part->setDatetimeEnded(null); $this->part->setProcess(null); $this->repository->savePart($this->part); }
/** * @inheritdoc */ public function markProcessing(ImportPart $part) { $part->setProcess(posix_getpid()); }