gongzhiyongandClaude Opus 4.6 063d4bf2a0 fix(backend): handle create_tables race condition between gunicorn workers
When 2 gunicorn workers start simultaneously, both call create_all()
which races on CREATE TABLE attachments. The second worker hits a
PostgreSQL UniqueViolation on pg_type_typname_nsp_index because the
type already exists. Wrap create_tables() in try/except to handle
this gracefully.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 18:48:11 +08:00
S
Description
No description provided
14 MiB
Languages
TypeScript 89.2%
CSS 4.3%
Makefile 2.9%
JavaScript 2.5%
Dockerfile 0.5%
Other 0.6%