Skip to main content

Module events

Module events 

Source
Expand description

GET /api/v1/changes: what changed, as server-sent events, for the UI’s live pages (see archive/PROJECT.md, Web UI: 34A). Only what changed, never the new state: a client reads that from the other endpoints.

Events: run ({"run_id", "dag_id"}: the run, its tasks or attempts), dag ({"dag_id"}), workers ({}), and refresh ({}: anything may have changed, when changes were missed or can’t be followed; then every refresh_interval, 15 s by default). A comment every KEEP_ALIVE keeps idle connections open through proxies.

One follower per webserver reads the database’s changes (Database::changes), started by the first subscriber, and hands them to every connection.

Structs§

EventTimings
How the webserver follows the database’s changes.
Feed
The webserver’s feed of changes: a follower started by the first subscriber.

Enums§

Live
What the follower hands out.

Constants§

KEEP_ALIVE
How often an idle connection gets a comment.
REFRESH_INTERVAL
How often refresh is sent when the database’s changes can’t be followed, unless set otherwise (refresh_interval).

Functions§

event
live as a server-sent event.
events
What changed, as it happens: run, dag, workers and refresh events (see the module documentation).