summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/presque/JobQueueHandler.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/presque/JobQueueHandler.pm b/lib/presque/JobQueueHandler.pm
index 17a1e8a..2729f07 100644
--- a/lib/presque/JobQueueHandler.pm
+++ b/lib/presque/JobQueueHandler.pm
@@ -6,7 +6,15 @@ __PACKAGE__->asynchronous(1);
sub get {
my ( $self, $queue_name ) = @_;
+
+ if (!$queue_name) {
+ $self->response->code(404);
+ $self->response->body("queue name is missing");
+ return;
+ }
+
my $key = $queue_name . ':queue';
+
$self->application->redis->lrange(
$key, 0, 9,
sub {
@@ -46,6 +54,8 @@ presque::IndexHandler - a redis based message queue
=head1 DESCRIPTION
+Return some informations about a queue.
+
=head1 AUTHOR
franck cuny E<lt>franck@lumberjaph.netE<gt>