beady-eye v0.38.0
Heard at the pass: in beady-eye 0.38, the watcher hears every write within seconds
This post is more than a year old. It describes beady-eye v0.38.0; the latest release notes say what has changed since.
Give a project’s entry one line,
serve = "127.0.0.1:8742", the address its
bd serve listens on, and bdi watch in
beady-eye 0.38.0 follows that tracker’s event stream. A write
from any bd client then reaches every watching agent and script within
seconds, with nothing else running. A project without
serve is polled as before.
brew upgrade codeforbreakfast/tap/bdi
# or
cargo install beady-eye
Read the demo as text
till $ rail 12:42:25 spoon-1 open, ready The caff opens on Sundays 12:42:25 spoon-1.1 in_progress Get the Sunday rota signed off 12:42:25 spoon-1.2 open, waiting Open the till on Sunday mornings 12:42:25 spoon-1.3 open, waiting Add a Sunday drop to the bakery order 12:42:31 cook closed spoon-1.1: Sam and Priya both said yes (written 12:42:30) 12:42:31 spoon-1.1 closed Get the Sunday rota signed off 12:42:31 spoon-1.2 open, ready Open the till on Sunday mornings 12:42:31 spoon-1.3 open, ready Add a Sunday drop to the bakery order 12:42:35 front of house took spoon-1.2 (written 12:42:34) 12:42:35 spoon-1.2 in_progress Open the till on Sunday mornings 12:42:39 baker commented on spoon-1.3: Two extra sourdough for the Sunday drop (written 12:42:38) 12:42:39 spoon-1.3 open, ready Add a Sunday drop to the bakery order
Deferred, not forgotten
Each bead line from the watcher now carries
defer_until_reached. It turns true once the bead’s
defer_until has passed, and the bead is sent again then,
so whatever waits on a deferred bead hears when it comes due.
Checks you can read
Where GitHub refuses a fine-grained token a commit’s check runs,
as it does on a private repository, bdi gates reads the
commit’s workflow runs and statuses instead, and still tells
failing checks from passing ones. Give the token Actions read
access for this.
Leaving without a fuss
Close the pane under a running bdi and it no longer aborts. Pipe
bdi --beads into a command that stops reading early, and
bdi just stops.
Before you upgrade
The event stream needs bd’s events journal turned on where
bd serve runs, with
bd config set events-journal true. Nothing polls a
project while its stream is down, so it shows as stale once
covered_for_seconds passes.
Order written, order heard. Service!