Skip to main content

claim_linking_mails_batch

Function claim_linking_mails_batch 

Source
pub async fn claim_linking_mails_batch(
    conn: &mut PgConnection,
    people: &[DiscoveredPerson],
) -> ModelResult<Vec<ClaimedLinkingMails>>
Expand description

Claims one slot and one unbound token per person and address, dedup before rate cap and the allowance spent left to right. Returns one outcome per input, in order; a claimed slot means a mail the link-emails phase still owes.