/** * Return an array containing all of the queues that this worker should use * when searching for jobs. * * If * is found in the list of queues, every queue will be searched in * alphabetic order. (@see $fetch) * * @param boolean $fetch If true, and the queue is set to *, will fetch * all queue names from redis. * * @return array Array of associated queues. */ public function queues($fetch = true) { if (!in_array('*', $this->queues) || $fetch == false) { return $this->queues; } $queues = Resque::queues(); sort($queues); return $queues; }
public function testJobWithNamespace() { Redis::prefix('php'); $queue = 'jobs'; $payload = array('another_value'); Resque::enqueue($queue, JobWithTearDown::className(), $payload); $this->assertEquals(Resque::queues(), array('jobs')); $this->assertEquals(Resque::size($queue), 1); Redis::prefix('resque'); $this->assertEquals(Resque::size($queue), 0); }