mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Refactor some code to handle command line imports.
This commit is contained in:
@@ -48,10 +48,8 @@ class FileRoutine implements RoutineInterface
|
||||
public function run(): void
|
||||
{
|
||||
Log::debug(sprintf('Now in run() for file routine with status: %s', $this->importJob->status));
|
||||
if ($this->importJob->status !== 'running') {
|
||||
throw new FireflyException('This file import job should not be started.'); // @codeCoverageIgnore
|
||||
}
|
||||
if ($this->importJob->stage === 'ready_to_run') {
|
||||
if ($this->importJob->status === 'ready_to_run') {
|
||||
$this->repository->setStatus($this->importJob, 'running');
|
||||
// get processor, depending on file type
|
||||
// is just CSV for now.
|
||||
$processor = $this->getProcessor();
|
||||
|
Reference in New Issue
Block a user