mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
More code for import routine.
This commit is contained in:
@@ -21,10 +21,10 @@ use Log;
|
||||
class ImportRoutine
|
||||
{
|
||||
|
||||
/** @var Collection */
|
||||
public $journals;
|
||||
/** @var Collection */
|
||||
public $errors;
|
||||
/** @var Collection */
|
||||
public $journals;
|
||||
/** @var int */
|
||||
public $lines = 0;
|
||||
/** @var ImportJob */
|
||||
@@ -39,7 +39,7 @@ class ImportRoutine
|
||||
{
|
||||
$this->job = $job;
|
||||
$this->journals = new Collection;
|
||||
$this->errors = new Collection;
|
||||
$this->errors = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,8 +60,14 @@ class ImportRoutine
|
||||
/** @var FileProcessorInterface $processor */
|
||||
$processor = app($class);
|
||||
$processor->setJob($this->job);
|
||||
|
||||
set_time_limit(0);
|
||||
if ($this->job->status == 'configured') {
|
||||
|
||||
// set job as "running"...
|
||||
$this->job->status = 'running';
|
||||
$this->job->save();
|
||||
|
||||
Log::debug('Job is configured, start with run()');
|
||||
$processor->run();
|
||||
$objects = $processor->getObjects();
|
||||
@@ -81,7 +87,10 @@ class ImportRoutine
|
||||
$this->job->save();
|
||||
|
||||
$this->journals = $storage->journals;
|
||||
$this->errors = $storage->errors;
|
||||
$this->errors = $storage->errors;
|
||||
|
||||
// run rules:
|
||||
|
||||
|
||||
Log::debug(sprintf('Done with import job %s', $this->job->key));
|
||||
|
||||
|
Reference in New Issue
Block a user