Deliver a scheduled query or report to its recipients
What It Does
A recurrence is due, or an authorized person requests an immediate schedule run. Manual execution uses the clicking person’s access.
The Flow
Claim due recurrences, insert unique occurrence runs, advance recurrence and publish delivery work. For manual execution, commit the run and its export request, then publish after commit. Start the occurrence using the owner for automatic work or manual runner for immediate work. Resolve the pinned query or current report. Generate query files in the receive, or dispatch a report render and poll its file for up to twelve minutes. Suppress delivery for an empty query when its empty-result option is enabled. Resolve each current recipient address, record skip reasons where needed and submit the template and personal signed link through Communications. Settle success, skip or failure through recurrence tracking, resetting or incrementing the streak and applying the five-failure pause.
When Something Fails
A later dispatcher pass handles missed due work. A due run may wait for successful dispatch. Observed publication rejection releases the offered run for dispatch. A crash between commit and publication can leave an offered queued run awaiting recovery. Source access loss fails the run; applicable automatic occurrences pause their schedule. Manual-run access failure does not by itself pause the owner’s recurrence. Permanent refusals settle; infrastructure or unfinished-render failures retry within three receives. A report file can complete after the delivery run has already failed. The skip outcome is recorded rather than retried as a delivery error. No communication is requested for the skipped occurrence. Submission failure retries the run while retaining completed recipient outcomes. Some recipients can already have messages while others await another attempt. A persistence error remains subject to the consumer’s failure handling. Delivered external messages remain delivered even if later settlement fails.
Idempotency and Concurrency
Occurrence uniqueness protects admission. Retries reuse the run’s file and recipient communication keys, which coordinate duplicate submission without recalling any message already sent. The dispatcher is single-concurrency. Three delivery consumers run separately from interactive export work, and a report run occupies its consumer while polling the renderer.