Skip to main content

choose

Function choose 

Source
pub(super) fn choose(
    state: &AppState,
    leader: &Leader,
    ask_route: &RouteAsk,
    model: Option<&str>,
    effort: Option<&str>,
) -> Result<(String, WorkerRuntime), SpawnError>
Expand description

The harness and runtime of a new worker: its model and effort over its leader’s, on the leader’s route unless ask names another. A worker on a route keeps the leader’s mode and effort and takes the route’s model; a worker on another harness takes none of its leader’s remembered runtime, which is the leader’s harness’s.