Skip to content

reserve job

twilson63 edited this page Feb 4, 2012 · 1 revision

Reserve Job (GET /:queue)


Reserves a job from a queue.

Inputs

None

Returns Reserved Job

Name Type Description
id String unique job id
klass String Name of Job
args Array Array of arguments

JSON Job Object (application/json)

{
  "id": "uniquekey",
  "klass": "Foo",
  "args": ["arg1"]
}

Returns Queue Empty

Name Type Description
status String "empty"

Errors

None

CURL

curl http://localhost:8000/update_foo -H 'Content-Type: application/json'

Example Request

GET /foo HTTP/1.1
Host: localhost:8000
Accept: application/json

Example Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: XXX
Connection: keep-alive

{
  "klass":"foo",
  "args":[],
  "id":"eb0b481e370a4688831d9bf97f0d9085"
}
Something went wrong with that request. Please try again.