diff --git a/lib/Resque.php b/lib/Resque.php index 47291899..ed10f928 100644 --- a/lib/Resque.php +++ b/lib/Resque.php @@ -259,6 +259,20 @@ public static function queues() return $queues; } + /** + * Retrieve all the items of a list with Redis + * + * @return array Array of items. + */ + public static function lrange($list,$start,$stop) + { + $list = self::redis()->lrange($list,$start,$stop ); + if(!is_array($list)) { + $list = array(); + } + return $list; + } + /** * Remove Items from the queue * Safely moving each item to a temporary queue before processing it