Skip to content
Extraits de code Groupes Projets
Valider 47d13f83 rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Trying to fix a timing issue in archive.php by calling by default with...

Trying to fix a timing issue in archive.php by calling by default with date=last2 instead of date=last1

git-svn-id: http://dev.piwik.org/svn/trunk@5233 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 7ed30eb4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -52,7 +52,7 @@ At the end, some basic metrics and processing time are logged on screen. ...@@ -52,7 +52,7 @@ At the end, some basic metrics and processing time are logged on screen.
Notes about the algorithm: Notes about the algorithm:
- The first time it runs, all websites with traffic in the last 7 days will be processed - The first time it runs, all websites with traffic in the last 7 days will be processed
- To improve performance, API is called with date=last1 whenever possible, instead of last52. - To improve performance, API is called with date=last2 (to query yesterday and today) whenever possible, instead of last52.
To do so, the script logs the last time it executed correctly. To do so, the script logs the last time it executed correctly.
- The script tries to achieve Near real time for \"today\" reports, processing \"period=day\" as frequently as possible. - The script tries to achieve Near real time for \"today\" reports, processing \"period=day\" as frequently as possible.
- The script will only process (or re-process) reports for Current week / Current month - The script will only process (or re-process) reports for Current week / Current month
...@@ -392,8 +392,9 @@ class Archiving ...@@ -392,8 +392,9 @@ class Archiving
} }
else else
{ {
//TODO: could be more clever here, not period=month&date=last52... //Note: could be more clever here, not period=month&date=last52...
$dateLast = floor( (time() - $lastTimestampWebsiteProcessed) / 86400) + 1; // Enforcing last2 at minimum to work around timing issues and ensure we make most archives available
$dateLast = floor( (time() - $lastTimestampWebsiteProcessed) / 86400) + 2;
if($dateLast > self::DEFAULT_DATE_LAST) { if($dateLast > self::DEFAULT_DATE_LAST) {
$dateLast = self::DEFAULT_DATE_LAST; $dateLast = self::DEFAULT_DATE_LAST;
} }
......
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