Site queue workers

List queue workers

List all the queue workers available in the server.

GET api/servers/{server}/sites/{id}/queues

Example request:

curl -X GET "https://ploi.io/api/servers/{server}/sites/{id}/queues" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create queue worker

Creates a new queue worker in the server

POST api/servers/{server}/sites/{id}/queues

Parameters

Parameter Type Status Description
connection string required
queue string required
maximum_seconds integer required Minimum: 0 Maximum: 60000
sleep integer required Minimum: 0 Maximum: 60000
processes integer required Minimum: 1 Maximum: 120
maximum_tries integer optional Minimum: 1 Maximum: 60000

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/queues" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data '{"connection":"database", "queue":"default", "maximum_seconds":"30", "sleep":"30", "processes":"2", "maximum_tries": "3"}'

Show queue worker

Show the queue worker in the server.

GET api/servers/{server}/sites/{id}/queues/{queueId}

Example request:

curl -X GET "https://ploi.io/api/servers/{server}/sites/{id}/queues/{queueId}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Restart site queue worker

Restarts a queue worker in your server

POST api/servers/{server}/sites/{id}/queues/{queueId}/restart

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/queues/{queueId}/restart" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Delete site queue worker

Deletes a queue worker in your server

DELETE api/servers/{server}/sites/{id}/queues/{queueId}

Example request:

curl -X DELETE "https://ploi.io/api/servers/{server}/sites/{id}/queues/{queueId}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"