pub async fn register_callback<'e, E>(
executor: E,
job_id: i64,
run_lease: i64,
timeout: Duration,
) -> Result<Uuid, AwaError>where
E: PgExecutor<'e>,Expand description
Register a callback for a running job, writing the callback_id and timeout to the database immediately.
Call this BEFORE sending the callback_id to the external system to avoid the race condition where the external system fires before the DB knows about the callback.
Returns the generated callback UUID on success.