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); } }
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; } } }
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(); } } } }
public function suspend(SpoutInterface $spout) { $spout->suspend(); }
public function suspend() { return $this->spout->suspend(); }