/** * @param AfterAttemptEvent $event */ public function onAfterAttempt(AfterAttemptEvent $event) { $this->logger->info(sprintf('Completed attempt for "%s" (%s)', $this->name, $this->uniqueId), ['result' => $event->getResult()]); }
/** * Check if we have a return we should retry on, and throw an exception if so * * @param AfterAttemptEvent $event */ public function onAfterAttempt(AfterAttemptEvent $event) { if (in_array($event->getResult(), $this->returns)) { throw new ReturnException('Retrying on return, converting to exception'); } }