airflow.providers.edge.models.edge_worker

Module Contents

Classes

EdgeWorkerState

Status of a Edge Worker instance.

EdgeWorkerModel

A Edge Worker instance which reports the state and health.

Functions

set_metrics(worker_name, state, jobs_active, ...)

Set metric of edge worker.

reset_metrics(worker_name)

Reset metrics of worker.

exception airflow.providers.edge.models.edge_worker.EdgeWorkerVersionException[source]

Bases: airflow.exceptions.AirflowException

Signal a version mismatch between core and Edge Site.

class airflow.providers.edge.models.edge_worker.EdgeWorkerState[source]

Bases: str, enum.Enum

Status of a Edge Worker instance.

STARTING = 'starting'[source]

Edge Worker is in initialization.

RUNNING = 'running'[source]

Edge Worker is actively running a task.

IDLE = 'idle'[source]

Edge Worker is active and waiting for a task.

TERMINATING = 'terminating'[source]

Edge Worker is completing work and stopping.

OFFLINE = 'offline'[source]

Edge Worker was shut down.

UNKNOWN = 'unknown'[source]

No heartbeat signal from worker for some time, Edge Worker probably down.

class airflow.providers.edge.models.edge_worker.EdgeWorkerModel(worker_name, state, queues, first_online=None, last_update=None)[source]

Bases: airflow.models.base.Base, airflow.utils.log.logging_mixin.LoggingMixin

A Edge Worker instance which reports the state and health.

property sysinfo_json: dict[source]
property queues: list[str] | None[source]

Return list of queues which are stored in queues field.

__tablename__ = 'edge_worker'[source]
worker_name[source]
state[source]
first_online[source]
last_update[source]
jobs_active[source]
jobs_taken[source]
jobs_success[source]
jobs_failed[source]
sysinfo[source]
add_queues(new_queues)[source]

Add new queue to the queues field.

remove_queues(remove_queues)[source]

Remove queue from queues field.

airflow.providers.edge.models.edge_worker.set_metrics(worker_name, state, jobs_active, concurrency, free_concurrency, queues)[source]

Set metric of edge worker.

airflow.providers.edge.models.edge_worker.reset_metrics(worker_name)[source]

Reset metrics of worker.

Was this entry helpful?