flush
Send the in-memory batch and attempt to upload the durable queue.
Flush now
import { flush } from "@hyperreal/landscape-core";
await flush();
Signature
function flush(): Promise<void>
Waits until the client is ready, flushes the in-memory batch, then uploads the durable queue.
Automatic flushes
Batches also flush when:
- the buffer reaches
batchSize(default10) flushIntervalMselapses (default5000)pagehidefiresvisibilitychangemoves the document tohidden
Transport and failures
HttpTransport tries sendBeacon, then fetch with keepalive, then fetch.
Failed sends leave events in the event store. The retry scheduler drains later (retryBaseMs default 1000, retryMaxMs default 60000). Offline (navigator.onLine === false) skips upload and schedules retry.