The examples on this page show common ways to use the APC API — they’re not a complete API reference. For the full, interactive API documentation for your installation, including every available query, mutation, and type, go to
https://houston.<your-base-domain>/v1, and click the Docs tab. See Develop and test APC API queries for more on using the built-in GraphQL explorer.workerQueues argument on upsertDeployment. For what worker queues do and how to use them in the UI, see Configure worker queues.
Astro Private Cloud 2.2This feature was introduced in Astro Private Cloud 2.2. To access this feature, upgrade your Astro Private Cloud installation to 2.2 or later.
Enable worker queues for a Deployment
deployments.workerQueues.enabled gates worker queues and ships false. To turn it on for one Deployment, set a deployment-level config override:
maxPerDeployment to the same object to raise or lower the queue cap for this Deployment:
updateWorkspaceDeploymentsConfig for a Workspace, updateCluster for a cluster, or values.yaml for the whole platform. See Enable worker queues and Config governance.
Read a Deployment’s worker queues
workerQueues is an empty list on Kubernetes executor and Helm-mode Deployments, never null.
Read the limits that apply to a Deployment
Resource bounds are overridable per cluster, Workspace, and Deployment, so read them for the Deployment you’re changing instead of assuming the platform defaults:null isn’t enforced.
canWorkerQueuesAutoscale is true when this Deployment’s queues can run a worker range. See Confirm autoscaling is available.
Add a worker queue
Send the complete list, including the existingdefault queue:
InputWorkerQueue fields
cpu is in millicores and memory and ephemeralStorage are in MiB. The API takes integers, not Kubernetes resource strings: send 2000, not "2", and 4096, not "4Gi".
Sending only one of minWorkerCount and maxWorkerCount leaves replicas at 1, makes the missing bound fall back to it, and then rejects the inverted pair. Send both bounds or neither. To run a fixed number of workers, send replicas alone. To let a queue autoscale, send a maxWorkerCount above its minWorkerCount. See Set a worker range on a queue for an example.
There’s no id field and no isDefault field. Queues are matched by name across an update, and isDefault is derived from the name default.
Resize a worker queue
Send the full list again with the changed values. This example doublesheavy-etl and leaves default as it was:
Delete a worker queue
Send the list without it. Droppingheavy-etl from the previous example deletes that queue and its workers.
Nothing checks whether your Dag code still routes to the omitted queue. Tasks that name a deleted queue wait indefinitely with no error.
The default queue can’t be dropped: a list that doesn’t contain it is rejected.
Update a Deployment without touching its queues
Omit theworkerQueues argument. Any other upsertDeployment call — changing environment variables, alert emails, or the image — leaves the queues as they are:
The legacy workers argument
Theworkers argument still works and aliases the default queue. Precedence is:
A script written before worker queues existed keeps working against a multi-queue Deployment and doesn’t collapse the other queues.
Errors
Out-of-range
cpu, memory, and ephemeralStorage values return INTERNAL_SERVER_ERROR rather than BAD_USER_INPUT. The message names the field, the value, and the allowed range.