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);
     }
 }
Exemple #2
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 printFinished($plugin, Am_Event_Rebuild $event)
 {
     if ($event->needContinue()) {
         echo ___('CONTINUE') . "({$plugin}-" . htmlentities($event->getDoneString()) . ")";
     } else {
         echo ___('DONE');
     }
 }
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);
     }
 }