Various cleanup in import.

This commit is contained in:
James Cole
2018-01-10 18:18:49 +01:00
parent 87dae6ea18
commit 91178d2604
10 changed files with 272 additions and 153 deletions

View File

@@ -82,33 +82,6 @@ class ImportJob extends Model
throw new NotFoundHttpException;
}
/**
* @param int $index
* @param string $message
*
* @return bool
*/
public function addError(int $index, string $message): bool
{
$extended = $this->extended_status;
$extended['errors'][$index][] = $message;
$this->extended_status = $extended;
return true;
}
/**
* @param int $count
*/
public function addStepsDone(int $count)
{
$status = $this->extended_status;
$status['done'] += $count;
$this->extended_status = $status;
$this->save();
Log::debug(sprintf('Add %d to steps done for job "%s" making steps done %d', $count, $this->key, $status['done']));
}
/**
* @param int $count
*/