about summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-05-09 15:47:35 +0200
committerfranck cuny <franck@lumberjaph.net>2010-05-09 15:47:35 +0200
commitfb673fabb14363a9e4ae417354fa1b3c3fbfbb25 (patch)
treee847a473ac85a11462a6294cfb7616e208f0b5be
parentadd JSON (diff)
downloadpresque-fb673fabb14363a9e4ae417354fa1b3c3fbfbb25.tar.gz
start to write more POD
-rw-r--r--lib/presque.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/presque.pm b/lib/presque.pm
index 0ca9fc1..69998d6 100644
--- a/lib/presque.pm
+++ b/lib/presque.pm
@@ -89,8 +89,12 @@ return some basic information about a queue.
 
 =item B<GET /control/queuename>
 
+return the status of the queue. A queue have two statues: open or closed. When a queue is closed, no job can be extracted from the queue.
+
 =item B<POST /control/queuename>
 
+change the status of the queue.
+
 =back
 
 =head2 INSERT A JOB
@@ -100,6 +104,12 @@ must be a valid JSON object.
 
     curl -H 'Content-Type: application/json' -X POST "http://localhost:5002/q/foo" -d '{"key":"value"}'
 
+It's possible to create delayed jobs (eg: job that will not be run before a defined time in the futur).
+
+    curl -H 'Content-Type: application/json' -X POST "http://localhost:5002/q/foo?delayed="$(expr `date +%s` + 500) -d '{"key":"value"}'
+
+the B<delayed> value should be a date in epoch
+
 =head2 FETCH A JOB
 
 Return a JSON object