diff options
author | franck cuny <franck@lumberjaph.net> | 2010-05-15 17:41:09 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-05-15 17:41:09 +0200 |
commit | 80e1cf6515f5ad348d55c8359e1f8aeb7500cb79 (patch) | |
tree | cfa4ad284a88bd55b3690e8843c2d85201ba6ed5 /lib/presque | |
parent | clean POD, move spec to appropriate class (diff) | |
download | presque-80e1cf6515f5ad348d55c8359e1f8aeb7500cb79.tar.gz |
spec for control handler
Diffstat (limited to '')
-rw-r--r-- | lib/presque/ControlHandler.pm | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/lib/presque/ControlHandler.pm b/lib/presque/ControlHandler.pm index 7ef56e5..ccfc663 100644 --- a/lib/presque/ControlHandler.pm +++ b/lib/presque/ControlHandler.pm @@ -66,12 +66,67 @@ __END__ =head1 NAME -presque::ControlHandler - a redis based message queue +presque::ControlHandler + +=head1 SYNOPSIS + + # stop a queue + curl -X POST -H 'Content-Type: application/json' -d '{"status":"stop"}' http://localhost:5000/control/queuename + + # start a queue + curl -X POST -H 'Content-Type: application/json' -d '{"status":"start"}' http://localhost:5000/control/queuename + + # fetch the status of a queue + curl http://localhost:5000/control/queuename =head1 DESCRIPTION +By default, when a queue is created, the status is set to 'open'. When a queue is set to 'stop', no job will be fetched from the queue. + =head1 METHODS +=head2 GET + +=over 4 + +=item path + +/control/queuename + +=item request + +=item response + +content-type : application/json + +code : 200 + +content : {"status":"0","queue":"foo"} + +=back + +=head2 POST + +=over 4 + +=item path + +/control/queuename + +=item request + +content-type : application/json + +content : {"status":"stop"} + +=item response + +content-type : application/json + +content : {"response":"updated","queue":"foo"} + +=back + =head1 AUTHOR franck cuny E<lt>franck@lumberjaph.netE<gt> |