---
id: ADR-PFM-QRY-005
title: Queue workers and durable jobs have distinct execution boundaries
product_area: platform
module: queries
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  File exports, report renders and schedule runs use queued work; search rebuilds and snapshot
  attempts use durable jobs, while workspace export generation has a registered job design without a
  deployed runner.
constrains:
  - WF-PFM-QRY-005
  - WF-PFM-QRY-006
  - WF-PFM-QRY-007
  - WF-PFM-QRY-008
  - WF-PFM-QRY-016
  - WF-PFM-QRY-018
  - WF-PFM-QRY-019
  - WF-PFM-QRY-010
origin: docs/queued-work.md (Andrew 2026-10-10); docs/jobs.md
alternatives:
  - option: Wrap every task in a durable job
    why_not: Simple file requests would add a watched workflow without needing multiple stages.
  - option: Finish background work inside the HTTP request
    why_not: Large exports and renders exceed the request function’s time limit.
consequences:
  - >-
    Queue consumers consult business status on redelivery; this does not establish exclusive
    execution of a running row.
  - Durable job reconciliation handles submissions that were created but never started.
supersedes: []
evidence:
  - >-
    services-platform at ad3f6a6: docs/queued-work.md; docs/jobs.md;
    modules/queries/db/query-export-requests.table.ts
---

# Queue workers and durable jobs have distinct execution boundaries

## Context

Background tasks differ in duration and in how much progress must survive interruption. Query generation uses asynchronous invocation and reconciliation; revalidation uses a scheduled bounded pass.

## Decision

File exports, report renders and schedule runs use queued work; search rebuilds and snapshot attempts use durable jobs, while workspace export generation has a registered job design without a deployed runner.

## Alternatives Considered

Wrap every task in a durable job: Simple file requests would add a watched workflow without needing multiple stages.

Finish background work inside the HTTP request: Large exports and renders exceed the request function’s time limit.

## Consequences

Queue consumers consult business status on redelivery; this does not establish exclusive execution of a running row. Durable job reconciliation handles submissions that were created but never started.
