Files for new reelase.

This commit is contained in:
James Cole
2021-03-27 20:01:28 +01:00
parent 922050a79b
commit adfdcdb9c6
53 changed files with 225 additions and 161 deletions

View File

@@ -50,8 +50,8 @@ abstract class AbstractCronjob
*/
public function __construct()
{
$this->force = false;
$this->date = today(config('app.timezone'));
$this->force = false;
$this->date = today(config('app.timezone'));
$this->jobErrored = false;
$this->jobSucceeded = false;
$this->jobFired = false;
@@ -68,7 +68,8 @@ abstract class AbstractCronjob
*/
public function setDate(Carbon $date): void
{
$this->date = $date;
$newDate = clone $date;
$this->date = $newDate;
}
/**

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Cronjobs;
use Carbon\Carbon;
use Exception;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Jobs\CreateRecurringTransactions;
use FireflyIII\Models\Configuration;
@@ -55,7 +54,10 @@ class RecurringCronjob extends AbstractCronjob
Log::info(sprintf('It has been %s since the recurring transactions cron-job has fired.', $diffForHumans));
if (false === $this->force) {
Log::info('The cron-job will not fire now.');
$this->message = sprintf('It has been %s since the recurring transactions cron-job has fired. It will not fire now.', $diffForHumans);
$this->message = sprintf('It has been %s since the recurring transactions cron-job has fired. It will not fire now.', $diffForHumans);
$this->jobFired = false;
$this->jobErrored = false;
$this->jobSucceeded = false;
return;
}
@@ -80,7 +82,7 @@ class RecurringCronjob extends AbstractCronjob
*/
private function fireRecurring(): void
{
Log::info(sprintf('Will now fire recurring cron job task for date "%s".', $this->date->format('Y-m-d')));
Log::info(sprintf('Will now fire recurring cron job task for date "%s".', $this->date->format('Y-m-d H:i:s')));
/** @var CreateRecurringTransactions $job */
$job = app(CreateRecurringTransactions::class);
$job->setDate($this->date);