diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-05-09 15:47:35 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-05-09 15:47:35 +0200 |
| commit | fb673fabb14363a9e4ae417354fa1b3c3fbfbb25 (patch) | |
| tree | e847a473ac85a11462a6294cfb7616e208f0b5be /lib/presque.pm | |
| parent | add JSON (diff) | |
| download | presque-fb673fabb14363a9e4ae417354fa1b3c3fbfbb25.tar.gz | |
start to write more POD
Diffstat (limited to 'lib/presque.pm')
| -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 |
