pyfarm.agent.http.api.tasks module¶
-
class
pyfarm.agent.http.api.tasks.
Tasks
[source]¶ Bases:
pyfarm.agent.http.api.base.APIResource
-
get
(**kwargs)[source]¶ Returns all tasks which are currently being processed locally by the agent.
-
GET
/api/v1/tasks/ HTTP/1.1
¶ Request
GET /api/v1/tasks/ HTTP/1.1
Response
HTTP/1.1 200 OK Content-Type: application/json [{ "id": "732c1ef0-9488-4914-adef-c29f481f3f5b", "frame": 1, "attempt": 1 }, { "id": "34ce3964-b654-4ad4-8416-f5ddba67806e", "frame": 2, "attempt": 1 }]
Statuscode 200: The request was processed successfully -
-
delete
(**kwargs)[source]¶ HTTP endpoint for stopping and deleting an individual task from this agent.
Warning
If the specified task is part of a multi-task assignment, all tasks in this assignment will be stopped, not just the specified one.
This will try to asynchronously stop the assignment by killing all its child processes. If that isn’t successful, this will have no effect.
-
DELETE
/api/v1/tasks/<int:task_id> HTTP/1.1
¶ Request
DELETE /api/v1/tasks/1 HTTP/1.1
Response
HTTP/1.1 202 ACCEPTED Content-Type: application/json
Statuscode 202: The task was found and will be stopped. Statuscode 204: Nothing to do, no task matching the request was found Statuscode 400: There was a problem with the request, check the error -
-