コード例 #1
0
 /**
  * Checks before the crawler is triggerd, for crawling entries,
  * which aren't running anymore, but still have a status of "running".
  * The Status of those entries will be changed to "incomplete" 
  */
 private function changeRunningCrawlingToIncomplete()
 {
     $crawlings = $this->crawlerRepo->findBy(array('runStatus' => self::RUN_STATUS_RUNNING));
     if ($crawlings && count($crawlings) > 0) {
         foreach ($crawlings as $crawlRun) {
             $crawlRun->setRunStatus(self::RUN_STATUS_INCOMPLETE);
             $this->em->persist($crawlRun);
         }
         $this->em->flush();
     }
 }
コード例 #2
0
 /**
  * Checks before the crawler is triggerd, for crawling entries,
  * which aren't running anymore, but still have a status of "running".
  * The Status of those entries will be changed to "incomplete"
  */
 protected function changeRunningCrawlingToIncomplete()
 {
     $crawlings = $this->crawlerRepo->findBy(array('runStatus' => self::RUN_STATUS_RUNNING));
     if (!$crawlings || !count($crawlings)) {
         return;
     }
     foreach ($crawlings as $crawlRun) {
         $crawlRun->setRunStatus(self::RUN_STATUS_INCOMPLETE);
     }
     $this->em->flush();
 }