pub fn acquire_key(
key: Option<String>,
run_id: RunId,
key_gate: &mut KeyGate,
) -> LifecycleResultExpand description
Attempts to acquire the concurrency key for a run.
Returns LifecycleResult::Acquired if the key is free or already held by
the same run. Returns LifecycleResult::KeyOccupied if another run holds it.
The key is obtained from the task constraints. Returns NoAction if no
concurrency key is defined.