Test improvement for import routine.

This commit is contained in:
James Cole
2018-09-30 20:14:17 +02:00
parent e50641e969
commit 50ab1fa3f0
4 changed files with 104 additions and 62 deletions

View File

@@ -78,13 +78,13 @@ class BunqRoutine implements RoutineInterface
$handler->run();
$transactions = $handler->getTransactions();
// could be that more transactions will arrive in a second run.
if (true === $handler->stillRunning) {
if (true === $handler->isStillRunning()) {
Log::debug('Handler indicates that it is still working.');
$this->repository->setStatus($this->importJob, 'ready_to_run');
$this->repository->setStage($this->importJob, 'go-for-import');
}
$this->repository->appendTransactions($this->importJob, $transactions);
if (false === $handler->stillRunning) {
if (false === $handler->isStillRunning()) {
Log::info('Handler indicates that its done!');
$this->repository->setStatus($this->importJob, 'provider_finished');
$this->repository->setStage($this->importJob, 'final');
@@ -98,6 +98,8 @@ class BunqRoutine implements RoutineInterface
}
/**
* Set the import job.
*