/** * Set the encrypter instance. * * @param \Illuminate\Contracts\Encryption\Encrypter $crypt * @return void * @static */ public static function setEncrypter($crypt) { //Method inherited from \Illuminate\Queue\Queue \Illuminate\Queue\RedisQueue::setEncrypter($crypt); }
/** * Establish a queue connection. * * @param array $config * @return \Illuminate\Contracts\Queue\Queue */ public function connect(array $config) { $queue = new RedisQueue($this->redis, $config['queue'], array_get($config, 'connection', $this->connection)); $queue->setExpire(array_get($config, 'expire', 60)); return $queue; }
public function testLaterOnShortTermQueue() { $this->shortTermQueue->shouldReceive('later')->once()->with(60, 'job', 'data', 'queue'); $this->hybridQueue->later(60, 'job', 'data', 'queue'); }
/** * Release the job back into the queue. * * @param int $delay * @return void */ public function release($delay = 0) { parent::release($delay); $this->delete(); $this->redis->release($this->queue, $this->job, $delay, $this->attempts() + 1); }
/** * {@inheritdoc} */ public function migrateExpiredJobs($from, $to) { parent::migrateExpiredJobs($from, $to); $this->addQueueIfNotLocked(substr($to, 7)); }
/** * Release the job back into the queue. * * @param int $delay * @return void */ public function release($delay = 0) { parent::release($delay); $this->redis->deleteAndRelease($this->queue, $this->reserved, $delay); }
/** * Set the IoC container instance. * * @param \Illuminate\Container\Container $container * @return void * @static */ public static function setContainer($container) { //Method inherited from \Illuminate\Queue\Queue \Illuminate\Queue\RedisQueue::setContainer($container); }
/** * Delete the job from the queue. * * @return void */ public function delete() { parent::delete(); $this->redis->deleteReserved($this->queue, $this->job); }
/** * Create a new Redis queue instance. * * @param \Illuminate\Redis\Database $redis * @param string $default * @param string $connection * @return void */ public function __construct(Database $redis, $default = 'default', $connection = null) { parent::__construct($redis, $default, $connection); }