Skip to main content

claim_job_for_agent_with_token

Function claim_job_for_agent_with_token 

pub fn claim_job_for_agent_with_token(
    config: &Config,
    job_id: &str,
    agent_alias: &str,
    now: DateTime<Utc>,
) -> Result<Option<String>>
Expand description

Claim an agent-owned job and return the opaque claim token.

The token identifies this specific execution. It lets cleanup release only the claim it acquired, so a cancelled run cannot clear a later execution’s lock for the same job.