Пример #1
0
 /**
  * Execute command like: ./console core:run-scheduled-tasks
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->forceRunAllTasksIfRequested($input);
     FrontController::getInstance()->init();
     API::getInstance()->runScheduledTasks();
     $this->writeSuccessMessage($output, array('Scheduled Tasks executed'));
 }
Пример #2
0
 /**
  * Execute command like: ./console core:run-scheduled-tasks
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->forceRunAllTasksIfRequested($input);
     FrontController::getInstance()->init();
     $scheduledTasksResults = API::getInstance()->runScheduledTasks();
     foreach ($scheduledTasksResults as $scheduledTasksResult) {
         $output->writeln(sprintf('<comment>%s</comment> - %s', $scheduledTasksResult['task'], $scheduledTasksResult['output']));
     }
     $this->writeSuccessMessage($output, array('Scheduled Tasks executed'));
 }
Пример #3
0
 private function getApiToInvalidateArchivedReport()
 {
     if ($this->apiToInvalidateArchivedReport) {
         return $this->apiToInvalidateArchivedReport;
     }
     return CoreAdminHomeAPI::getInstance();
 }
Пример #4
0
 private function initSegmentsToArchive()
 {
     $segments = APICoreAdminHome::getInstance()->getKnownSegmentsToArchive();
     if (empty($segments)) {
         return array();
     }
     $this->log("- Will pre-process " . count($segments) . " Segments for each website and each period: " . implode(", ", $segments));
     return $segments;
 }