pub async fn enqueue(
conn: &DatabaseConnection,
queue: &str,
job_type: &str,
payload: &str,
max_retries: u32,
idempotency_key: Option<&str>,
tenant_id: Option<i64>,
available_at: DateTime<Utc>,
) -> Result<(), Error>Expand description
Insert a new job into the queue.
When idempotency_key is Some, skips the insert if a pending or
claimed row with the same (job_type, idempotency_key) already exists
(D-15, T-185-01).