Skip to content

blackbull.server.warmup

blackbull.server.warmup

Best-effort warm-up before binding and fork.

Never leave a live socket, task or temporary event loop for workers to inherit. Failures log and fall back to cold startup; the wall-clock budget must bound boot.

run_warmup(app, ssl_context=None)

Run best-effort warmup hooks before fork in a temporary, closed event loop.

Single-worker startup runs hooks on the serving loop instead.

warm_tls(ssl_context, *, n=None) async

Return completed TLS handshakes from up to n in-memory BIO attempts.

Return zero when disabled or no TLS context is supplied.

warmup_inline(app, ssl_context=None) async

Run best-effort hooks on the serving loop; log hook failures without preventing startup.