Delete a reserved job from the reserved queue and release it.

@param  string  $queue
@param  \Illuminate\Queue\Jobs\RedisJob  $job
@param  int  $delay
@return void
760082
public function deleteAndRelease($queue, $job, $delay)
    {
        $queue = $this->getQueue($queue);

        $this->getConnection()->eval(
            LuaScripts::release(), 2, $queue.':delayed', $queue.':reserved',
            $job->getReservedJob(), $this->availableAt($delay)
        );
    }
740909
public function push(Job $job, $queueName = '')
    {
        if (!isset($this->queues[$queueName])) {
            $this->queues[$queueName] = [];
        }

        $this->queues[$queueName][] = $job;

        return Queue::QUEUED;

    }
671054
public function enqueueIn(int $seconds, Job $job)
    {
        $at = time() + $seconds;

        $this->enqueueAt($at, $job);
    }
789483
protected function reserve( $job ) {
		$data = array(
			'reserved_at' => $this->datetime(),
		);

		$this->database->update( $this->jobs_table, $data, array(
			'id' => $job->id(),
		) );
	}
1273044
public function handle(Queue $queue, JobRepository $jobs)
    {
        if (is_null($job = $jobs->findFailed($this->id))) {
            return;
        }

        $queue->connection($job->connection)->pushRaw(
            $this->preparePayload($id = JobId::generate(), $job->payload), $job->queue
        );

        $jobs->storeRetryReference($this->id, $id);
    }
628919
public function releaseJob($id, $delay = 0)
    {
        $payload = $this->getPayload($id);

        if ($payload[self::JOB_PAYLOAD_STATE] !== self::STATE_RESERVED) {
            throw new QueueException(' Cannot release state unsupported! ' . $payload[self::JOB_PAYLOAD_STATE]);
        }

        $keyReady = $this->getKeyReady($payload[self::JOB_PAYLOAD_QUEUE]);
        $keyDelayed = $this->getKeyDelayed($payload[self::JOB_PAYLOAD_QUEUE]);
        $keyReserved = $this->getKeyReserved($payload[self::JOB_PAYLOAD_QUEUE]);
        $redisJobNamespace = $this->getRedisJobNamespace();

        $result = $this->getRedis()->transaction(
            function ($tx) use ($id, $payload, $delay, $keyReady, $keyDelayed, $keyReserved, $redisJobNamespace) {
                /** @var $tx \Predis\Client */
                $tx->zrem($keyReserved, $id);

                $payload = self::buildPayload($payload[self::JOB_PAYLOAD_QUEUE], (($delay)
                    ? self::STATE_DELAYED
                    : self::STATE_READY
                ));
                $tx->hset($redisJobNamespace, $id, $payload);

                if ($delay == 0) {
                    $tx->rpush($keyReady, $id);
                } else {
                    $tx->zadd($keyDelayed, $this->getTime() + $delay, $id);
                }
            }
        );

        return !in_array(false, $result);
    }
947729
public function push($job, $data = '', $queue = null)
    {
        $id = $this->storeJob($job, $data, $queue);

        return 0;
    }
1003999
public function process($connection, Job $job, $maxTries = 0, $delay = 0)
	{
		if ($maxTries > 0 && $job->attempts() > $maxTries)
		{
			return $this->logFailedJob($connection, $job);
		}

		try
		{
			// First we will fire off the job. Once it is done we will see if it will
			// be auto-deleted after processing and if so we will go ahead and run
			// the delete method on the job. Otherwise we will just keep moving.
			$job->fire();

			return ['job' => $job, 'failed' => false];
		}

		catch (Exception $e)
		{
			// If we catch an exception, we will attempt to release the job back onto
			// the queue so it is not lost. This will let is be retried at a later
			// time by another listener (or the same one). We will do that here.
			if ( ! $job->isDeleted()) $job->release($delay);

			throw $e;
		}
	}
1305218
public function delayed($delay, Job $job)
    {
        return $this->connector->delayed($this->queue, $delay, $job);
    }
147965
public function later($delay, $job, $data = '', $queue = null)
    {
        return Timer::after($this->secondsUntil($delay) * 1000, function () use ($job, $data, $queue) {
            return $this->push($job, $data, $queue);
        });
    }
860759
public function push( Job $job, $delay = 0 ) {
		$result = $this->database->insert( $this->jobs_table, array(
			'job'          => serialize( $job ),
			'available_at' => $this->datetime( $delay ),
			'created_at'   => $this->datetime(),
		) );

		if ( ! $result ) {
			return false;
		}

		return $this->database->insert_id;
	}
64845
public function later($delay, $job, $data = '', $queue = null)
    {
        $pheanstalk = $this->pheanstalk->useTube($this->getQueue($queue));

        return $pheanstalk->put(
            $this->createPayload($job, $this->getQueue($queue), $data),
            Pheanstalk::DEFAULT_PRIORITY,
            $this->secondsUntil($delay),
            $this->timeToRun
        );
    }
111538
public function release($message, $delay = 0)
    {
        if (!$message instanceof QueueMessage) {
            $msg = new QueueMessage();
            $msg->setId($message);
        }

        $message->setDelay($delay);

        $this->driver->release($message);
    }
546746
public function deleteReserved($queue, $job)
	{
		$this->redis->zrem($this->getQueue($queue).':reserved', $job);
	}
320161
public function pop($queue = null)
    {
        $this->migrate($prefixed = $this->getQueue($queue));

        if (empty($nextJob = $this->retrieveNextJob($prefixed))) {
            return;
        }

        [$job, $reserved] = $nextJob;

        if ($reserved) {
            return new RedisJob(
                $this->container, $this, $job,
                $reserved, $this->connectionName, $queue ?: $this->default
            );
        }
    }
35859
public function deleteReserved($queue, $job)
    {
        $this->getConnection()->zrem($this->getQueue($queue).':reserved', $job);
    }
1284505
public function release($delay = 0)
    {
        parent::release($delay);

        if (!$this->pushed) {
            $this->delete();
        }

        $this->recreateJob($delay);
    }