Beispiel #1
0
 public function action_process()
 {
     $this->do_fork(function () {
         Swiftriver_Dropletqueue::process();
         exit;
     });
 }
Beispiel #2
0
 /**
  * Run the crawlers
  */
 public static function do_crawl()
 {
     Kohana::$log->add(Log::INFO, "Crawler started");
     Kohana::$log->write();
     self::do_schedule();
     // If we got some drops, process them
     if (!Swiftriver_Dropletqueue::isempty()) {
         Kohana::$log->add(Log::INFO, "Crawler post processing");
         Kohana::$log->write();
         Swiftriver_Dropletqueue::process();
     }
     Kohana::$log->add(Log::INFO, "Crawler completed");
 }
Beispiel #3
0
 /**
  * Gets the list of droplets that have already undergone processing
  * This method should be called by the controller that is responsible
  * for rendering the processed droplets on the UI
  *
  * @return array
  */
 public static function get_processed_droplets()
 {
     // Fetch the processed droplets
     $result = self::$_processed;
     // Reset the processed queue
     self::$_processed = array();
     return $result;
 }