Skip to main content

once_reached

Function once_reached 

Source
pub async fn once_reached<T, F, Fut>(
    __arg0: (&str, &str),
    retry: Duration,
    stop: Receiver<u32>,
    attempt: F,
) -> Result<Option<T>, AppError>
where F: FnMut() -> Fut, Fut: Future<Output = Result<T, AppError>>,
Expand description

attempt’s output once the database at url answers: while it fails because the database can’t be reached for now (schedr_db::DbError::is_transient: down, starting, busy, a time limit), tried again every retry. A role starting before its database waits for it instead of exiting (the user, 2026-11-15, after B247); a wrong host or port fails the same way, so the warning names where it looks (the host and port, or the file: never the user or password) and why (codes only), at once and again every minute while it waits. None once a shutdown is asked for, before or during a try.

§Errors

attempt’s error when it isn’t transient (a wrong URL, password or TLS setting).