about summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-06-24 11:12:07 +0200
committerfranck cuny <franck@lumberjaph.net>2010-06-24 11:12:07 +0200
commit07597ec011da0c8a0158faefe1f26c7b3b21ea69 (patch)
treeee498d2fcc320f4d170f87317298a5607ad3b30d
parentremove before for http methods, set content type before finish (diff)
downloadpresque-07597ec011da0c8a0158faefe1f26c7b3b21ea69.tar.gz
add POD
-rw-r--r--lib/presque/JobQueueHandler.pm32
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>