Beispiel #1
0
 /**
  * Returns a timestamp indicating outdated archives older than this timestamp (processed before) can be purged.
  *
  * @return int|bool  Outdated archives older than this timestamp should be purged
  */
 protected function getOldestTemporaryArchiveToKeepThreshold()
 {
     $temporaryArchivingTimeout = Rules::getTodayArchiveTimeToLive();
     if (Rules::isBrowserTriggerEnabled()) {
         // If Browser Archiving is enabled, it is likely there are many more temporary archives
         // We delete more often which is safe, since reports are re-processed on demand
         return Date::factory($this->now - 2 * $temporaryArchivingTimeout)->getDateTime();
     }
     // If cron core:archive command is building the reports, we should keep all temporary reports from today
     return $this->yesterday->getDateTime();
 }