From 07597ec011da0c8a0158faefe1f26c7b3b21ea69 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Thu, 24 Jun 2010 11:12:07 +0200 Subject: add POD --- lib/presque/JobQueueHandler.pm | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/lib/presque/JobQueueHandler.pm b/lib/presque/JobQueueHandler.pm index 5887f5c..6bc9f8f 100644 --- a/lib/presque/JobQueueHandler.pm +++ b/lib/presque/JobQueueHandler.pm @@ -3,12 +3,11 @@ package presque::JobQueueHandler; use Moose; extends 'Tatsumaki::Handler'; -with ( - 'presque::Role::QueueName', +with + 'presque::Role::Queue::Names', 'presque::Role::Error', 'presque::Role::Response', - 'presque::Role::RequireQueue' => {methods => [qw/get/]}, -); + 'presque::Role::Queue::WithQueueName' => {methods => [qw/get/]}; __PACKAGE__->asynchronous(1); @@ -50,10 +49,35 @@ presque::JobQueueHandler =head1 SYNOPSIS + # grab info from a queue + curl http://localhost:5000/j/queuename + =head1 DESCRIPTION Return some informations about a queue. +=head1 METHODS + +=head2 GET + +=over 4 + +=item path + +/j/:queuename + +=item request + +=item response + +content-type: application/json + +code: 200 + +content : {"queue_name":"foo","job_count":"0","job_processed":"127","job_failed":"37" + +=back + =head1 AUTHOR franck cuny Efranck@lumberjaph.netE -- cgit v1.2.3