Delete a reserved job from the queue.

@param  string  $queue
@param  string  $job
@return void
546746
public function deleteReserved($queue, $job)
	{
		$this->redis->zrem($this->getQueue($queue).':reserved', $job);
	}
758767
public function clearQueue($queue)
    {
        $this->getClient()->del($this->getKey(self::QUEUE_KEY . $queue));
    }
671054
public function enqueueIn(int $seconds, Job $job)
    {
        $at = time() + $seconds;

        $this->enqueueAt($at, $job);
    }
317409
protected function marshalJob($queue, $job)
    {
        $job = $this->markJobAsReserved($job);

        return new DatabaseJob(
            $this, $job, $this->connectionName, $queue
        );
    }
526679
public function delete(JobInterface $job)
    {
        if ($job->isRunOnce()) {
            $this->getCache()->delete(self::CACHE_JOB.get_class($job));
        }
        return $job->getBeanstalkJob()->delete();
    }
342571
public function enqueue(Job\WrappedJob $job) {
        $this->repo->addJob($job, $this->name);
    }
150967
public function enqueueCron(string $cron, Job $job): void
    {
        $data = ['cron' => $cron, 'job' => $job->getPayload()];

        $id = Uuid::uuid4()->toString();

        $key = sprintf('%s:%s', self::CRON_QUEUE_NAME, $id);

        $this->client->set($key, json_encode($data));

        $this->updateCron($id, $cron);
    }
617880
public function enqueue(Job $job): void
    {
        $queue = $job->getQueue();

        $this->client->sadd('queue', [$queue]);

        $this->client->rpush(
            sprintf('queue:%s', $queue),
            [
                json_encode($job->getPayload()),
            ]
        );
    }
565877
public function push($job, array $data = null, $queue = null)
    {
        if (false !== ($delay = \Resque::getConfig('default.jobs.delay', false))) {
            return $this->later($delay, $job, $data, $queue);
        }

        return Job::create($this->getQueue($queue), $job, $data);
    }
1254720
protected function retryJob($job)
    {
        $this->app['queue']->driver($job->connector)->pushRaw(
            $this->resetAttempts($job->payload), $job->queue
        );
    }
852491
public function workingOn($job, $queue = null)
    {
        $job->worker = $this;
        $this->currentJob = $job;
        $this->working = true;
        if(isset($job->status)) {
            $job->status->update(ResqueJobStatus::STATUS_RUNNING);
        }
        $data = json_encode([
            'queue' => isset($queue) ? $queue : $job->queue,
            'run_at' => strtotime('now UTC'),
            'payload' => $job->payload
        ]);
        $this->resqueInstance->redis->set($this->workerName() . ':' . $job->worker, $data);
    }
180580
public function markJobDone(QueuedJob $job) {
		$fields = [
			'completed' => $this->getDateTime(),
		];
		$job = $this->patchEntity($job, $fields);

		return (bool)$this->save($job);
	}
694518
public function perform(Job $job)
    {
        // Set timeout so as to stop any hanged jobs
        // and turn off displaying errors as it fills
        // up the console
        set_time_limit($this->timeout);
        ini_set('display_errors', 0);

        $job->perform();

        $status = $job->getStatus();

        switch ($status) {
            case Job::STATUS_COMPLETE:
                $this->log('Done job <pop>'.$job.'</pop> in <pop>'.$job->execTimeStr().'</pop>', Logger::INFO);
                break;
            case Job::STATUS_CANCELLED:
                $this->log('Cancelled job <pop>'.$job.'</pop>', Logger::INFO);
                break;

            case Job::STATUS_FAILED:
                $this->log('Job '.$job.' failed: "'.$job->failError().'" in '.$job->execTimeStr(), Logger::ERROR);
                break;
            default:
                $this->log('Unknown job status "('.gettype($status).')'.$status.'" for <pop>'.$job.'</pop>', Logger::WARNING);
                break;
        }
    }
578867
public function delete()
    {
        parent::delete();

        $this->database->deleteReserved($this->queue, $this->job->id);
    }
1010220
public function deleteReserved($queue, $job)
    {
        parent::deleteReserved($queue, $job);

        $this->event($this->getQueue($queue), new JobDeleted($job, $job->getReservedJob()));
    }
90755
public function queueDelay(Job $job, $execute_at)
    {
        if ($this->isSingle()) {
            $queue_config = $this->getQueueConfig();
            if (isset($queue_config['driver'])) {
                /** @var BaseQueue $driver */
                $driver = $queue_config['driver'];
                $driver::component()->delay($job, $execute_at);
            }
        }
    }
166179
public function process($connection, Job $job, $maxTries = 0, $delay = 0)
    {
        if (($maxTries > 0) && ($job->attempts() > $maxTries)) {
            return $this->logFailedJob($connection, $job);
        }

        // First we will raise the before job event and 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.

        try {
            $this->raiseBeforeJobEvent($connection, $job);

            $job->handle();

            if ($job->autoDelete()) {
                $job->delete();
            }

            $this->raiseAfterJobEvent($connection, $job);

            return array('job' => $job, 'failed' => false);
        }

        // 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.

        catch (Exception $e) {
            if (! $job->isDeleted()) {
                $job->release($delay);
            }

            throw $e;
        }
        catch (Throwable $e) {
            if (! $job->isDeleted()) {
                $job->release($delay);
            }

            throw $e;
        }
    }