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
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-11-25 01:28:51 +0300
committerGitHub <noreply@github.com>2019-11-25 01:28:51 +0300
commit4d40a3df81f6dc114f7ee324e162fa8d0f5cf686 (patch)
treee7f1938394cada2c5e2790ae0e3ee60d1d05d221
parentab638844dbbc48548227286e65bbcf6a5e1672ca (diff)
Support CliMulti on OS X and print note about whether CliMulti is used in archive output (#15189)
* Support CliMulti on OS X (which does not have procfs). * Add output note about whether CliMulti is being used. * fix test
-rw-r--r--core/CliMulti/Process.php2
-rw-r--r--core/CronArchive.php5
-rw-r--r--core/SettingsServer.php5
-rw-r--r--tests/PHPUnit/Integration/CronArchiveTest.php1
4 files changed, 12 insertions, 1 deletions
diff --git a/core/CliMulti/Process.php b/core/CliMulti/Process.php
index df9bc696e8..044f64cd5d 100644
--- a/core/CliMulti/Process.php
+++ b/core/CliMulti/Process.php
@@ -181,7 +181,7 @@ class Process
return false;
}
- if (!self::isProcFSMounted()) {
+ if (!self::isProcFSMounted() && !SettingsServer::isMac()) {
return false;
}
diff --git a/core/CronArchive.php b/core/CronArchive.php
index 2e3d6fdca6..1a05533ff4 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -1391,6 +1391,11 @@ class CronArchive
$this->logger->info("- If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Matomo UI > Settings > General Settings.");
$this->logger->info(" See the doc at: https://matomo.org/docs/setup-auto-archiving/");
}
+
+ $cliMulti = new CliMulti();
+ $supportsAsync = $cliMulti->supportsAsync();
+ $this->logger->info("- " . ($supportsAsync ? 'Async process archiving supported, using CliMulti.' : 'Async process archiving not supported, using curl requests.'));
+
$this->logger->info("- Reports for today will be processed at most every " . $this->todayArchiveTimeToLive
. " seconds. You can change this value in Matomo UI > Settings > General Settings.");
diff --git a/core/SettingsServer.php b/core/SettingsServer.php
index 76cf9b6576..1b35efc8f1 100644
--- a/core/SettingsServer.php
+++ b/core/SettingsServer.php
@@ -215,4 +215,9 @@ class SettingsServer
@ini_set('max_execution_time', $executionTime);
@set_time_limit($executionTime);
}
+
+ public static function isMac()
+ {
+ return defined('PHP_OS') && PHP_OS === 'Darwin';
+ }
}
diff --git a/tests/PHPUnit/Integration/CronArchiveTest.php b/tests/PHPUnit/Integration/CronArchiveTest.php
index abef6f2258..4f4f2f9588 100644
--- a/tests/PHPUnit/Integration/CronArchiveTest.php
+++ b/tests/PHPUnit/Integration/CronArchiveTest.php
@@ -138,6 +138,7 @@ Running Matomo %s as Super User
NOTES
- If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Matomo UI > Settings > General Settings.
See the doc at: https://matomo.org/docs/setup-auto-archiving/
+- Async process archiving supported, using CliMulti.
- Reports for today will be processed at most every %s seconds. You can change this value in Matomo UI > Settings > General Settings.
- Reports for the current week/month/year will be requested at most every %s seconds.
- Will process all 1 websites