/** * Establish a queue connection. * * @param array $config * * @return \StudioBonito\SilverStripe\Queue\QueueInterface */ public function connect(array $config) { $queue = isset($config['queue']) ? $config['queue'] : 'default'; return DbQueue::create($queue); }
/** * Release the job back into the queue. * * @param int $delay * * @return void */ public function release($delay = 0) { $this->delete(); $this->db->release($this->queue, $this->getRawPayload(), $delay, $this->attempts() + 1); }