Advertisement
Guest User

Untitled

a guest
Dec 1st, 2010
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. $queue = new SplQueue();
  2.  
  3. $queue->setIteratorMode(SplQueue::IT_MODE_DELETE);
  4.  
  5. foreach ($queue as $record) {
  6.  
  7.     try {
  8.  
  9.         // generate, convert document here
  10.        
  11.     }
  12.  
  13.     catch (Zend_Service_LiveDocx_Exception $e) {
  14.        
  15.         $queue->enqueue($record);
  16.  
  17.         sleep(30);
  18.  
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement