Electric.ShapeCache.ShapeStatusOwner (electric v1.5.1)

Copy Markdown View Source

Owns the ETS table and the ShapeStatus state.

This process creates the ETS table for shapes and initializes Electric.ShapeCache.ShapeStatus early in the supervision tree so that dependent processes (e.g., shape consumers) can use a single, shared ShapeStatus instance regardless of their own supervisor start order.

Initialization is done asynchronously via handle_continue to avoid blocking the supervision tree startup on potentially slow SQLite reads.

Summary

Functions

Returns a specification to start this module under a supervisor.

Refresh shape metadata from SQLite after lock acquisition.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

name(stack_id)

refresh(stack_id)

Refresh shape metadata from SQLite after lock acquisition.

Uses an infinite timeout because on laggy storage with an incorrectly shut-down database this can take a long time.

start_link(opts)