Skip to content

Commit

Permalink
Merge pull request chrisboulton#237 from drahmel/master
Browse files Browse the repository at this point in the history
Added remove_queue command from Resque
  • Loading branch information
chrisboulton committed May 13, 2015
2 parents 941d49c + 44940e8 commit df69e89
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/Resque.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ public static function dequeue($queue, $items = Array())
}
}

/**
* Remove specified queue
*
* @param string $queue The name of the queue to remove.
* @return integer Number of deleted items
*/
public static function removeQueue($queue)
{
$num = self::removeList($queue);
self::redis()->srem('queues', $queue);
return $num;
}

/**
* Pop an item off the end of the specified queues, using blocking list pop,
* decode it and return it.
Expand Down

0 comments on commit df69e89

Please sign in to comment.