diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/presque.pm | 10 |
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 |