Skip to content

Commit df69e89

Browse files
committed
Merge pull request #237 from drahmel/master
Added remove_queue command from Resque
2 parents 941d49c + 44940e8 commit df69e89

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/Resque.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,19 @@ public static function dequeue($queue, $items = Array())
143143
}
144144
}
145145

146+
/**
147+
* Remove specified queue
148+
*
149+
* @param string $queue The name of the queue to remove.
150+
* @return integer Number of deleted items
151+
*/
152+
public static function removeQueue($queue)
153+
{
154+
$num = self::removeList($queue);
155+
self::redis()->srem('queues', $queue);
156+
return $num;
157+
}
158+
146159
/**
147160
* Pop an item off the end of the specified queues, using blocking list pop,
148161
* decode it and return it.

0 commit comments

Comments
 (0)