Flyte 2 Devbox is available today to run a full Flyte backend and UI locally. Preview Flyte 2 for production, hosted on Union.ai
0.3.0

Queue

Package: flyteplugins.union.remote

Represents a Union scheduling queue.

Parameters

class Queue(
    pb2: queue_pb2.Queue,
)
Parameter Type Description
pb2 queue_pb2.Queue

Properties

Property Type Description
action_concurrency int
clusters list[str]
created_at str
depth int
domain str
fairness str
name str
organization str
priority str
project str
run_concurrency int
status str
updated_at str

Methods

Method Description
activate() Re-activate a draining or drained queue.
create() Create a new queue.
details() Get a single point-in-time metrics snapshot for a queue.
drain() Begin draining a queue — stops new submissions, lets in-flight work complete.
get() Get a queue by name.
listall() List all queues in the organization.
to_dict() Convert the object to a JSON-serializable dictionary.
to_json() Convert the object to a JSON string.
update() Update a queue’s configuration.
watch() Stream real-time queue metrics via gRPC server streaming.

activate()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Queue.activate.aio().

def activate(
    cls,
    name: str,
    org: str | None,
    domain: str,
    project: str,
) -> Queue

Re-activate a draining or drained queue.

Parameter Type Description
cls
name str
org str | None
domain str
project str

create()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Queue.create.aio().

def create(
    cls,
    name: str,
    org: str | None,
    domain: str,
    project: str,
    run_concurrency: int,
    action_concurrency: int,
    depth: int,
    priority: str,
    fairness: str,
    clusters: list[str] | None,
) -> Queue

Create a new queue.

Parameter Type Description
cls
name str
org str | None
domain str
project str
run_concurrency int
action_concurrency int
depth int
priority str
fairness str
clusters list[str] | None

details()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Queue.details.aio().

def details(
    cls,
    name: str,
    org: str | None,
    domain: str,
    project: str,
) -> dict

Get a single point-in-time metrics snapshot for a queue.

Reads the first message from the WatchQueueMetrics stream. For continuous updates, use Queue.watch.

Parameter Type Description
cls
name str
org str | None
domain str
project str

drain()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Queue.drain.aio().

def drain(
    cls,
    name: str,
    org: str | None,
    domain: str,
    project: str,
) -> Queue

Begin draining a queue — stops new submissions, lets in-flight work complete.

Parameter Type Description
cls
name str
org str | None
domain str
project str

get()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Queue.get.aio().

def get(
    cls,
    name: str,
    org: str | None,
    domain: str,
    project: str,
) -> Queue

Get a queue by name.

Parameter Type Description
cls
name str
org str | None
domain str
project str

listall()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Queue.listall.aio().

def listall(
    cls,
    org: str | None,
    limit: int,
) -> AsyncIterator[Queue]

List all queues in the organization.

Parameter Type Description
cls
org str | None
limit int

to_dict()

def to_dict()

Convert the object to a JSON-serializable dictionary.

Returns: dict: A dictionary representation of the object.

to_json()

def to_json()

Convert the object to a JSON string.

Returns: str: A JSON string representation of the object.

update()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Queue.update.aio().

def update(
    cls,
    name: str,
    org: str | None,
    domain: str,
    project: str,
    run_concurrency: int | None,
    action_concurrency: int | None,
    depth: int | None,
    priority: str | None,
    fairness: str | None,
    clusters: list[str] | None,
) -> Queue

Update a queue’s configuration. Unset fields are read from the current spec.

Parameter Type Description
cls
name str
org str | None
domain str
project str
run_concurrency int | None
action_concurrency int | None
depth int | None
priority str | None
fairness str | None
clusters list[str] | None

watch()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Queue.watch.aio().

def watch(
    cls,
    name: str,
    org: str | None,
    domain: str,
    project: str,
) -> AsyncIterator[dict]

Stream real-time queue metrics via gRPC server streaming.

Yields dicts shaped for the CLI watch UI: the queue’s caps merged with each QueueMetrics snapshot pushed by the server. The server controls the cadence of updates.

Parameter Type Description
cls
name str
org str | None
domain str
project str