/** * {@inheritdoc} */ public function fail($queueName, Envelope $env) { try { $this->conn->bury($this->assurePheanstalkEnvelope($env)->getJob(), $this->options['fail-priority']); } catch (\Pheanstalk\Exception $e) { throw PheanstalkError::fromException($e); } }
/** * {@inheritdoc} */ public function fail($queueName, Envelope $env) { if (!$env instanceof PheanstalkEnvelope) { throw new InvalidEnvelope(sprintf('%s requires that envelopes be instances of "%s", got "%s"', __CLASS__, PheanstalkEnvelope::class, get_class($env))); } try { $this->conn->bury($env->getJob(), $this->options['fail-priority']); } catch (\Pheanstalk\Exception $e) { throw PheanstalkError::fromException($e); } }