Back office: one-way DB -> Sheets mirror
- After each mutation, the affected tab + activity_log are pushed to Sheets by a single serialized background worker (Postgres stays source of truth; a mirror failure never fails the DB write). Concurrency race fixed by serializing through one worker; PYTHONUNBUFFERED for visible logs. - _cell() formats dates/timestamps/numbers/bools and neutralises formula injection. POST /api/sync does a full DB->Sheets resync of every tab. Verified: add/edit/delete propagate to the Sheet; full resync aligns all tabs; DB and Sheet consistent after cleanup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
Reference in New Issue
Block a user