mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 03:53:37 +00:00
Improve the bunq routine so it will keep looping when faced with default PHP time out settings (30 seconds).
This commit is contained in:
@@ -73,6 +73,33 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
return $job;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append transactions to array instead of replacing them.
|
||||
*
|
||||
* @param ImportJob $job
|
||||
* @param array $transactions
|
||||
*
|
||||
* @return ImportJob
|
||||
*/
|
||||
public function appendTransactions(ImportJob $job, array $transactions): ImportJob
|
||||
{
|
||||
Log::debug(sprintf('Now in appendTransactions(%s)', $job->key));
|
||||
$existingTransactions = $job->transactions;
|
||||
if (!\is_array($existingTransactions)) {
|
||||
$existingTransactions = [];
|
||||
}
|
||||
$new = array_merge($existingTransactions, $transactions);
|
||||
Log::debug(sprintf('Old transaction count: %d', \count($existingTransactions)));
|
||||
Log::debug(sprintf('To be added transaction count: %d', \count($transactions)));
|
||||
Log::debug(sprintf('New count: %d', \count($new)));
|
||||
$job->transactions = $new;
|
||||
|
||||
|
||||
$job->save();
|
||||
|
||||
return $job;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $importProvider
|
||||
*
|
||||
|
Reference in New Issue
Block a user