jellycell.server.watch

File-system watcher → SSE events.

Wraps :mod:watchfiles.awatch. Maps paths to :class:ReloadEvent or

class:

ArtifactEvent and publishes via the broker.

Module Contents

Functions

map_change

Translate a file-system change into an SSE event (or None if ignored).

watch_project

Long-running watcher that publishes events until the task is cancelled.

API

jellycell.server.watch.map_change(project: jellycell.paths.Project, path: pathlib.Path) jellycell.server.sse.ReloadEvent | jellycell.server.sse.ArtifactEvent | None

Translate a file-system change into an SSE event (or None if ignored).

async jellycell.server.watch.watch_project(project: jellycell.paths.Project, broker: jellycell.server.sse.ReloadBroker) None

Long-running watcher that publishes events until the task is cancelled.