Ejemplo n.º 1
0
 public function resume(SpoutInterface $spout)
 {
     if (!$this->start) {
         $this->start = new \DateTime();
         $spout->push($this->bubble);
     } elseif ($this->start->diff(new \DateTime())->s > $this->throttle) {
         $this->start = new \DateTime();
         $spout->push($this->bubble);
     }
 }
Ejemplo n.º 2
0
 public function resume(SpoutInterface $spout)
 {
     if (!$this->enabled) {
         if (!$this->start) {
             $this->start = new \DateTime();
         } elseif ($this->start->diff(new \DateTime())->s > $this->delay) {
             $spout->push($this->bubble);
             $this->enabled = true;
         }
     }
 }
Ejemplo n.º 3
0
 public function resume(\bubblr\Spout\SpoutInterface $spout)
 {
     foreach ($this->bubbles as $k => $bubble) {
         if (!$bubble instanceof BubbleInterface) {
             $bubble = $this->bubbles[$k] = $spout->getBubbler()->getAdapter()->execute($this, $bubble);
         }
         $bubble->resume($spout);
         if ($bubble->isComplete()) {
             if ($bubble->isFailure()) {
                 $this->exceptions[] = $bubble->getException();
             } elseif ($bubble->isCanceled()) {
                 $this->exceptions[] = new BubbleCanceledException($bubble);
             } else {
                 $this->results[] = $bubble->getResult();
             }
         }
     }
 }
Ejemplo n.º 4
0
 public function suspend(SpoutInterface $spout)
 {
     $spout->suspend();
 }
Ejemplo n.º 5
0
 public function suspend()
 {
     return $this->spout->suspend();
 }