diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-09-28 22:04:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 22:04:33 +0300 |
commit | fff3dddae9f7ce341576e8c131545867a5916b0d (patch) | |
tree | 7fac4614f3626631ea2d48b509708c7b98f784e4 /core | |
parent | 14b46df582d850b201eac4930071f6cf9fe73f52 (diff) |
Add back missing stop archiver exception (#16479)
Was added in https://github.com/matomo-org/matomo/pull/15724 but somehow got lost if 4.x
Diffstat (limited to 'core')
-rw-r--r-- | core/CronArchive.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php index 9dbaa59134..6753873513 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -21,6 +21,7 @@ use Piwik\Archive\ArchiveInvalidator; use Piwik\CliMulti\RequestParser; use Piwik\CronArchive\QueueConsumer; use Piwik\CronArchive\SharedSiteIds; +use Piwik\CronArchive\StopArchiverException; use Piwik\DataAccess\ArchiveSelector; use Piwik\DataAccess\ArchiveTableCreator; use Piwik\DataAccess\Model; @@ -260,10 +261,14 @@ class CronArchive $self = $this; Access::doAsSuperUser(function () use ($self) { - $self->init(); - $self->run(); - $self->runScheduledTasks(); - $self->end(); + try { + $self->init(); + $self->run(); + $self->runScheduledTasks(); + $self->end(); + } catch (StopArchiverException $e) { + $this->logger->info("Archiving stopped by stop archiver exception"); + } }); } |