pub struct ResolvedSearchConcurrency {
pub limit: u16,
pub source: SearchConcurrencySource,
}Expand description
The live-worker ceiling that bounded a search, plus where it came from.
Carried on the frozen receipt so an operator reading a run can tell a deliberately small Fleet pool from this crate’s fallback.
Fields§
§limit: u16§source: SearchConcurrencySourceImplementations§
Source§impl ResolvedSearchConcurrency
impl ResolvedSearchConcurrency
Sourcepub fn resolve(fleet_limit: Option<u16>) -> Self
pub fn resolve(fleet_limit: Option<u16>) -> Self
Resolve the ceiling from an already-resolved Fleet limit.
None — and a nonsensical Some(0), which would admit nothing — fall
back to WORKFLOW_SEARCH_DEFAULT_MAX_CONCURRENT.
Sourcepub fn from_fleet_config(
workflow_max_concurrent: Option<u32>,
profile_max_concurrency: Option<usize>,
) -> Self
pub fn from_fleet_config( workflow_max_concurrent: Option<u32>, profile_max_concurrency: Option<usize>, ) -> Self
Resolve straight from the two config seams the host already owns:
[workflow] max_concurrent (the per-run live-agent ceiling, see
codewhale_config::WorkflowConfigToml::max_concurrent) and a Fleet
profile’s delegation.max_concurrency hint
(codewhale_config::FleetDelegationHints::max_concurrency).
The lower of the present values wins: a profile that asks for fewer workers than the run allows is a real bound, and a run ceiling below a profile hint is the admission the host will actually grant.
Sourcepub fn receipt_line(&self) -> String
pub fn receipt_line(&self) -> String
One-line receipt copy naming the ceiling and its origin.
Trait Implementations§
Source§impl Clone for ResolvedSearchConcurrency
impl Clone for ResolvedSearchConcurrency
Source§fn clone(&self) -> ResolvedSearchConcurrency
fn clone(&self) -> ResolvedSearchConcurrency
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more