Skip to content

Setup tasks framework and delegate pmtiles export to a task on save - #147

Draft
TylerFisher wants to merge 6 commits into
mainfrom
pmtiles-task
Draft

Setup tasks framework and delegate pmtiles export to a task on save#147
TylerFisher wants to merge 6 commits into
mainfrom
pmtiles-task

Conversation

@TylerFisher

@TylerFisher TylerFisher commented May 15, 2026

Copy link
Copy Markdown
Contributor

Generates the public PMTiles export asynchronously instead of in the Django process.

  • Django now triggers a lambda when CovenantedParcel changes.
  • The Lambda (mp-covenants-pmtiles-export, separate repo) reads PostGIS directly, bakes the tiles with tippecanoe, uploads to S3, and POSTs back to a new token-authenticated callback endpoint (/api/pmtiles-callback/) that creates the PMTilesExport row.
  • Two new settings: PMTILES_LAMBDA_NAME (blank disables the trigger, keeping tests/local dev offline) and PMTILES_CALLBACK_TOKEN.
  • Schema parity between build_gdf and the Lambda's SQL is pinned by a shared fields.json + a test on both sides.
  • Requires the Lambda to be deployed with VPC access to Postgres, an S3 gateway endpoint, and a reachable callback URL before the trigger does anything.

@TylerFisher
TylerFisher requested a review from mikejcorey May 15, 2026 13:20
@TylerFisher
TylerFisher marked this pull request as draft May 15, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant