Managing queuing¶
Info
Learn the concepts and fundamentals of queuing in the Explanation page.
Queuing lets you submit runs beyond your allowed maximum concurrency limits. Queues are maintained for each execution class and ordered by priority then age. Here are the controls you have for queuing:
- Setting the priority, which must be a number between 1 (highest) and 9 (lowest). Default is 6.
- Disabling queuing. Default behavior is to queue.
You can customize queuing behavior impacting runs by modifying the instance configuration, or directly when starting a run.
Managing queuing when running¶
You can configure queuing behavior with the nextmv cloud run
create command in two ways:
- Use directly when starting a run with the
--priority,--no-queuingand--yes-queuingflags, or - Attach it to an instance configuration with the
--priority,--no-queuingand--yes-queuingflags and use that instance when starting a run.
Here is an example where the queuing behavior is modified when starting a run.
✅ Run latest-MervDFEvR created.
⏳ Getting run results...
✅ Run outputs saved to latest-MervDFEvR-output. Here is the metadata.
{
"description": "",
"id": "latest-MervDFEvR",
"metadata": {
"application_id": "uncanny-rodent",
"application_instance_id": "latest",
"application_version_id": "",
"created_at": "2026-07-23T22:20:25Z",
"duration": 6758.0,
"error": "",
"execution_class": "6c9500mb870s",
"execution_duration": 5589.0,
"format": {
"input": {
"type": "multi-file"
},
"output": {
"type": "multi-file"
}
},
"initiated_at": "2026-07-23T22:20:26.469732Z",
"input_size": 261.0,
"metrics": {
"metrics": {
"message": "Hello, Patches",
"value": 1.23
}
},
"options": {
"active_options": {
"details": "true"
},
"options_summary": [
{
"name": "details",
"source": "version",
"value": "true"
}
]
},
"output_size": 158.0,
"queuing_disabled": false,
"queuing_priority": 2,
"run_type": {
"type": "standard",
"definition_id": "",
"reference_id": ""
},
"runtime": "python-3_11",
"status_v2": "succeeded"
},
"name": "",
"user_email": "sebastian@nextmv.io",
"console_url": "https://cloud.nextmv.io/app/uncanny-rodent/run/latest-MervDFEvR?view=details"
}
Let's say we have an instance identified as production. First, let's update
it to disable queuing.
⏳ Updating instance...
✅ Instance production updated successfully in application uncanny-rodent.
{
"id": "production",
"application_id": "uncanny-rodent",
"version_id": "v0.0.1",
"name": "The main production instance",
"description": "",
"configuration": {
"execution_class": "6c9500mb870s",
"queuing": {
"priority": 6,
"disabled": true
}
},
"locked": false,
"created_at": "2026-07-23T17:35:36.018490Z",
"updated_at": "2026-07-23T22:21:36.319549Z"
}
We can now start a run using the production instance, and the attached
execution class will be used automatically.
✅ Run production-yaktvKPDg created.
⏳ Getting run results...
✅ Run outputs saved to production-yaktvKPDg-output. Here is the metadata.
{
"description": "",
"id": "production-yaktvKPDg",
"metadata": {
"application_id": "uncanny-rodent",
"application_instance_id": "production",
"application_version_id": "v0.0.1",
"created_at": "2026-07-23T22:22:09Z",
"duration": 6493.0,
"error": "",
"execution_class": "6c9500mb870s",
"execution_duration": 5369.0,
"format": {
"input": {
"type": "multi-file"
},
"output": {
"type": "multi-file"
}
},
"initiated_at": "2026-07-23T22:22:09.467270Z",
"input_size": 261.0,
"metrics": {
"metrics": {
"message": "Hello, Patches",
"value": 1.23
}
},
"options": {
"active_options": {
"details": "true"
},
"options_summary": [
{
"name": "details",
"source": "version",
"value": "true"
}
]
},
"output_size": 158.0,
"queuing_disabled": true,
"queuing_priority": 6,
"run_type": {
"type": "standard",
"definition_id": "",
"reference_id": ""
},
"runtime": "python-3_11",
"status_v2": "succeeded"
},
"name": "",
"user_email": "sebastian@nextmv.io",
"console_url": "https://cloud.nextmv.io/app/uncanny-rodent/run/production-yaktvKPDg?view=details"
}
Getting the queue of runs¶
You can use the nextmv cloud run list command with the
--status flag set to queued to retrieve the list of runs that are currently
queued.
⏳ Listing app runs...
[
{
"id": "latest-isV8vKEDR",
"user_email": "sebastian@nextmv.io",
"name": "",
"description": "",
"created_at": "2026-07-23T22:28:14.690523Z",
"application_id": "uncanny-rodent",
"application_instance_id": "latest",
"application_version_id": "",
"run_type": {
"type": "standard",
"definition_id": "",
"reference_id": ""
},
"execution_class": "6c9500mb870s",
"runtime": "python-3_11",
"status_v2": "queued",
"queuing_priority": 6,
"queuing_disabled": false,
"options": {
"details": "true"
},
"options_summary": [
{
"name": "details",
"value": "true",
"source": "version"
}
]
}
]