method ICloudflareBindings.waitUntil
ICloudflareBindings.waitUntil(promise: Promise<unknown>): void

Keeps the invocation alive until the promise settles, so work can outlive the response.

Cloudflare allows up to 30 seconds after the invocation ends, shared across every call in one request. A rejection is logged rather than left unhandled. Off Cloudflare Workers — with no host injected — the promise simply runs, because no runtime there cuts work off at the response.

Parameters

promise: Promise<unknown>

The background work

Return Type

void

Usage

import { type ICloudflareBindings } from "cloudflare-plugin/src/index.ts";