<@ULVA73B9P> Is it possible to change which work q...
# marvin-ai
j
@Marvin Is it possible to change which work queue a flow run thats in the "late" status is in without cancelling and re-running the flow?
m
thought for 222.3 seconds
Short answer: no. In Prefect 3.x, the work queue a flow run is assigned to is set at creation time (via the deployment/work pool/queue routing) and cannot be changed on an existing run—even if it’s Late or Scheduled. The REST API for updating a flow run does not expose any field to change its work pool/queue, and the UI/CLI do not provide a way to reassign a run to a different queue. What you can do instead: - Start or reconfigure a worker to poll the queue the run is already on. Workers can poll multiple queues, so you can widen a worker’s scope temporarily:
Copy code
prefect worker start -p <work_pool_name> -q <existing_queue> -q <another_queue>
- Cancel and create a new run targeting the desired queue: - Cancel:
Copy code
prefect flow-run cancel <flow_run_id>
- Re-run from the deployment that points at the correct pool/queue:
Copy code
prefect deployment run <flow_name>/<deployment_name> [--param key=value ...]
- Update the deployment to the desired pool/queue for future runs. Note: this won’t move already-created runs. References: - Flow run update API - States and scheduling - Work pools and queues If you share what’s driving the need (e.g., no worker on that queue, infrastructure mismatch), I can suggest the quickest fix for your setup.