backend env updates and brand json files

This commit is contained in:
sriram
2026-08-14 12:14:58 +05:30
parent 21c675cb55
commit 1b56aae396
7 changed files with 1069 additions and 10 deletions

View File

@@ -140,6 +140,18 @@ DATABASE_URL = os.getenv(
f"postgresql://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DB_NAME}",
)
# How often to re-run the brand-table <-> seed-catalog reconcile after boot.
#
# The startup run alone only catches what existed at boot. A brand table created
# directly in the database while the server is up - by hand, by a script, or by
# another machine sharing this database - is not mirrored into the seed catalogs
# until the next restart. This interval is what closes that window.
#
# reconcile_brand_catalogs() is idempotent and non-destructive, so a sweep that
# finds nothing to do costs one COUNT(*) per brand table and writes nothing.
# 0 disables the loop, leaving the startup run and POST /api/system/brand-sync.
BRAND_SYNC_INTERVAL_SECONDS = int(os.getenv("BRAND_SYNC_INTERVAL_SECONDS", "300"))
# ---------------------------------------------------------------------------
# S3 / DigitalOcean Spaces (product image storage) - optional
# ---------------------------------------------------------------------------