mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-09-19 07:34:57 +08:00
71a402fe6a
Adds a scheduled() handler to the ingest worker that recomputes daily_event_counts / daily_dim_counts / daily_machines for the just-completed UTC day plus a 2-day overlap (late-arriving offline buffers), then purges raw events past the retention window. Rollup writes are idempotent upserts, so a re-run never double-counts. Also adds an ADMIN_TOKEN-guarded POST /admin/rollup?day=YYYY-MM-DD for backfill/repair, and drops the PostHog forwarding path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
6 lines
348 B
Plaintext
6 lines
348 B
Plaintext
# Copy to .dev.vars for local development (`npm run dev`) if you want to exercise
|
|
# POST /admin/rollup — without it that route 404s, which is also how a deploy that
|
|
# never ran `wrangler secret put ADMIN_TOKEN` behaves.
|
|
# The real token lives only in the deployed secret; nothing here is ever committed.
|
|
ADMIN_TOKEN="dev_admin_token_placeholder"
|