Skip to main content

Get Poll Data for All Tasks

Endpoint: GET /api/tasks/queue/polldata/all

Gets the last poll data for all the tasks in the Conductor task queue. The filter parameters can be used to refine the request based on your requirements. Multiple filters are applied with AND logic and can be combined (worker + queue + lastPoll).

Query parameters

ParameterDescriptionTypeRequired/ Optional
workerSizeThe number of worker instances polling for all the tasks in the queue.integerOptional.
workerOptOption to filter based on the worker size. Supported values:
  • GT (Greater than)
  • LT (Less than)
stringRequired if workerSize is used.
queueSizeThe total number of tasks in the queue waiting to be executed.integerOptional.
queueOptOption to filter based on the queue size. Supported values:
  • GT (Greater than)
  • LT (Less than)
stringRequired if queueSize is used.
lastPollTimeSizeThe last polled time in Unix timestamp format.integerOptional.
lastPollTimeOptOption to filter based on the last poll time. Supported values:
  • GT (Greater than)
  • LT (Less than)
stringRequired if lastPollTimeSize is used.

Response

Returns a map containing queueData and an array of pollData.

  • queueData: Indicates the size and poll count of each task.
  • pollData: Includes the queueName, workerId, and lastPollTime for each task.
    • queueName: The name of the task queue. For predefined tasks, this returns the task type, such as HTTP. For user-defined tasks, it returns the task definition name, such as python_worker.
    • workerId: The worker name from which the task is being polled, which is the hostname of the pod where the worker is running.
    • lastPollTime: The last polled time in Unix timestamp format.

If a worker has not picked up the task, no pollData will be available, and the array will be empty.

Examples

Get the last poll data for tasks with a queue size greater than 7

Request

curl -X 'GET' \
'https://<YOUR-SERVER-URL>/api/tasks/queue/polldata/all?queueSize=7&queueOpt=GT' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'

Response

{
"queueData": {
"_deciderQueue": {
"size": 31
},
"WAIT": {
"pollerCount": 1,
"size": 18
},
"_batch_upload_queue0": {
"size": 15
}
},
"pollData": [
{
"queueName": "WAIT",
"workerId": "acme-workers-deployment-5cf6957cdf-rn2pd",
"lastPollTime": 1735561620048
}
]
}

Here, pollData is available only for the WAIT task, as it is the only one the worker has picked up, while the rest of the tasks are in the queue awaiting workers.

Get the last poll data for tasks with a worker size greater than 1 and a queue size greater than 10

Request

curl -X 'GET' \
'https://<YOUR-SERVER-URL>/api/tasks/queue/polldata/all?workerSize=1&workerOpt=GT&queueSize=10&queueOpt=GT' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'

Response

{
"queueData": {
"WAIT": {
"pollerCount": 2,
"size": 752
}
},
"pollData": [
{
"queueName": "WAIT",
"workerId": "orkes-workers-deployment-676bf44f66-564j5",
"lastPollTime": 1753108836394
},
{
"queueName": "WAIT",
"workerId": "orkes-workers-deployment-676bf44f66-fjfxr",
"lastPollTime": 1753108836359
}
]
}