Exemple #1
0
 public function onRebuild(Am_Event_Rebuild $event)
 {
     $batch = new Am_BatchProcessor(array($this, 'batchProcess'), 5);
     $context = $event->getDoneString();
     $this->_rebuildName = $this->getId();
     $this->_sessionId = Zend_Session::getId();
     if ($batch->run($context)) {
         $event->setDone();
         $this->getDi()->storeRebuild->deleteByNameAndSession($this->_rebuildName, $this->_sessionId);
     } else {
         $event->setDoneString($context);
     }
 }
 function onRebuild(Am_Event_Rebuild $event)
 {
     $batch = new Am_BatchProcessor(array($this, 'batchProcess'), 5);
     $context = $event->getDoneString();
     $this->_batchStoreId = 'rebuild-' . $this->getId() . '-' . Zend_Session::getId();
     if ($batch->run($context)) {
         $event->setDone();
     } else {
         $event->setDoneString($context);
     }
 }
 function onRebuild(Am_Event_Rebuild $event)
 {
     $batch = new Am_BatchProcessor(array($this, 'doWork'), 15);
     $context = $event->getDoneString();
     $batch->run($context) ? $event->setDone() : $event->setDoneString($context);
 }
Exemple #4
0
 function onRebuild(Am_Event_Rebuild $event)
 {
     $this->getDi()->db->query("DELETE FROM ?_newsletter_user_subscription \n            WHERE list_id not in (SELECT list_id from ?_newsletter_list)");
     $batch = new Am_BatchProcessor(array($this, 'batchProcess'), 5);
     $context = $event->getDoneString();
     $this->_batchStoreId = 'rebuild-' . $this->getId() . '-' . Zend_Session::getId();
     if ($batch->run($context)) {
         $event->setDone();
     } else {
         $event->setDoneString($context);
     }
 }