pub fn watch(
stores: &ServerStores,
bus: &EventBus,
config: &WatchConfig,
report: impl FnMut(Watched),
) -> Result<usize>Expand description
Watch the event bus and build what lands.
Blocking, and deliberately so: the runner is one build at a time in the process that watched the event. A queue and a pool are the phase-5 problem; this is the part that has to be right, and “right” is easier to see when there is one of it.
Every outcome — built, skipped, failed — is handed to report rather than
logged and dropped, so a caller can assert on what happened. A build that
fails does not stop the watch: one repository’s broken recipe must not
take every other repository’s builds with it.