Skip to content
Extraits de code Groupes Projets
Valider bfdced2f rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

Merge pull request #8795 from andrzejewsky/master

Wrong place of CoreArchive.run.finish event
parents 9f572a3e a5aec42d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -285,7 +285,7 @@ class CronArchive ...@@ -285,7 +285,7 @@ class CronArchive
* *
* @param CronArchive $this * @param CronArchive $this
*/ */
Piwik::postEvent('CoreArchive.run.start', array($this)); Piwik::postEvent('CoreArchive.init.start', array($this));
SettingsServer::setMaxExecutionTime(0); SettingsServer::setMaxExecutionTime(0);
...@@ -452,6 +452,13 @@ class CronArchive ...@@ -452,6 +452,13 @@ class CronArchive
*/ */
public function end() public function end()
{ {
/**
* This event is triggered after archiving.
*
* @param CronArchive $this
*/
Piwik::postEvent('CoreArchive.end', array($this));
if (empty($this->errors)) { if (empty($this->errors)) {
// No error -> Logs the successful script execution until completion // No error -> Logs the successful script execution until completion
Option::set(self::OPTION_ARCHIVING_FINISHED_TS, time()); Option::set(self::OPTION_ARCHIVING_FINISHED_TS, time());
...@@ -466,13 +473,6 @@ class CronArchive ...@@ -466,13 +473,6 @@ class CronArchive
$summary = count($this->errors) . " total errors during this script execution, please investigate and try and fix these errors."; $summary = count($this->errors) . " total errors during this script execution, please investigate and try and fix these errors.";
$this->logFatalError($summary); $this->logFatalError($summary);
/**
* This event is triggered after archiving.
*
* @param CronArchive $this
*/
Piwik::postEvent('CoreArchive.run.finish', array($this));
} }
public function logFatalError($m) public function logFatalError($m)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter