Exemple #1
0
 private function didFinishBackup()
 {
     if (SGConfig::get('SG_REVIEW_POPUP_STATE') != SG_NEVER_SHOW_REVIEW_POPUP) {
         SGConfig::set('SG_REVIEW_POPUP_STATE', SG_SHOW_REVIEW_POPUP);
     }
     $action = $this->didFindWarnings() ? SG_ACTION_STATUS_FINISHED_WARNINGS : SG_ACTION_STATUS_FINISHED;
     self::changeActionStatus($this->actionId, $action);
     SGBackupLog::writeAction('backup', SG_BACKUP_LOG_POS_END);
     if (SGBoot::isFeatureAvailable('NOTIFICATIONS')) {
         SGBackupMailNotification::sendBackupNotification(true);
     }
     SGBackupLog::write('Total duration: ' . formattedDuration($this->actionStartTs, time()));
     $this->cleanUp();
 }
Exemple #2
0
 private function didFinishBackup()
 {
     $action = $this->didFindWarnings() ? SG_ACTION_STATUS_FINISHED_WARNINGS : SG_ACTION_STATUS_FINISHED;
     self::changeActionStatus($this->actionId, $action);
     SGBackupLog::writeAction('backup', SG_BACKUP_LOG_POS_END);
     if (SGBoot::isFeatureAvailable('NOTIFICATIONS')) {
         SGBackupMailNotification::sendBackupNotification(true);
     }
     SGBackupLog::write('Total duration: ' . formattedDuration($this->actionStartTs, time()));
     SGBackupLog::write('Memory usage (peak): ' . number_format(memory_get_peak_usage() / 1024.0 / 1024.0, 2, '.', '') . ' MB');
     $this->cleanUp();
 }