Skip to main content

worker_default_name

Function worker_default_name 

Source
pub fn worker_default_name(
    instance_label: &str,
    worker: &LocalWorker,
    book: &[LocalWorker],
    live: &BTreeSet<(String, String)>,
) -> String
Expand description

The default name of worker, one of this instance’s workers in book: default_name over its host app and its role as people read them. Two workers that would read the same (two sessions of one role on one instance, rc4-39 review) are told apart by an ordinal on the role (backend, backend 2, …): names Cloud already accepted are taken, and the rest are named in book order, so the first keeps the plain name and a single worker never gets a number. Only siblings an active session holds (live, (host_app, role) keys) count: an ended or crashed session never pushes a new one to backend 2 (bd 5!678).