Skip to main content

claim_job_for_agent

Function claim_job_for_agent 

pub fn claim_job_for_agent(
    config: &Config,
    job_id: &str,
    agent_alias: &str,
    now: DateTime<Utc>,
) -> Result<bool, Error>
Expand description

Claim a job only while it is still owned by agent_alias.

The owner predicate is part of the atomic claim update. This is the linearization point for an agent-facing manual trigger: a rename that wins before this statement prevents the former owner from executing the job.