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()
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,
) -> QueueRe-activate a draining or drained queue.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
|
org |
str | None |
|
domain |
str |
|
project |
str |
create()
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,
) -> QueueCreate 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()
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,
) -> dictGet 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()
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,
) -> QueueBegin 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()
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,
) -> QueueGet a queue by name.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
|
org |
str | None |
|
domain |
str |
|
project |
str |
listall()
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()
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,
) -> QueueUpdate 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()
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 |