---
title: "wait for queue item · RUAL Documentation"
description: "Polls a queue document by GUID and blocks the flow until the job reaches a terminal state (executed/failed) or the timeout elapses. Use with any block t…"
canonical: https://docs.rual.nl/block-types/queue/function_wait_for_queue_item
language: en
---

# wait for queue item

This block is part of the [`queue`](https://docs.rual.nl/block-types/queue) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Polls a queue document by GUID and blocks the flow until the job reaches a terminal state (executed/failed) or the timeout elapses. Use with any block that produces a queue_guid outpin (e.g. video_compress with wait_in_flow=false) to gate downstream work on background completion.

- flow `flow`

- queue guid required `value` GUID of the queue document to wait on.

- wait timeout (s) `number` How long to wait before giving up with WAIT_TIMEOUT.

Default `300`

- flow `flow`

- success `condition` True when the queue job completed successfully.

- state `value` Terminal state: executed, failed, timeout, or cancelled.

- result `object` The executor's recorded result map. Empty when the executor didn't record one (e.g. blueprint-trigger jobs).

- error `value` Failure reason when state != executed.

| `wait for queue` |
| --- |
| `queue wait` |
| `await queue` |

A typical wiring for [wait for queue item](https://docs.rual.nl/block-types/queue/function_wait_for_queue_item): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `queue_guid` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the wait for queue item block: typical wiring for wait for queue item.](https://docs.rual.nl/canvas-examples/function_wait_for_queue_item.png)

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
