Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2021-09-03 03:32:44 +0300
committerGitHub <noreply@github.com>2021-09-03 03:32:44 +0300
commit91984db2da728aaf884448b674b6988c574cab15 (patch)
tree2807ebe083f9d63de27c7697c2c2982220aa9fd5 /core
parentbb6999df6088aa199045986b973aeedcdc22f58b (diff)
try and reconnect database after running each scheduled task (at most once per two hours) during core:archive (#17949)
Diffstat (limited to 'core')
-rw-r--r--core/CronArchive.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php
index 453c21f6e5..e8e287d9ae 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -610,6 +610,11 @@ class CronArchive
$this->disconnectDb();
+ Piwik::addAction('ScheduledTasks.execute.end', function () {
+ // check if we need to reconnect after each task executes
+ $this->disconnectDb();
+ });
+
// TODO: this is a HACK to get the purgeOutdatedArchives task to work when run below. without
// it, the task will not run because we no longer run the tasks through CliMulti.
// harder to implement alternatives include: