diff options
-rw-r--r-- | lib/presque/JobQueueHandler.pm | 32 |
1 files 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 E<lt>franck@lumberjaph.netE<gt> |