feat(store): add auto_ingest config + pg connect/statement timeouts

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-07-24 10:34:27 +08:00
parent 81dea38310
commit 70f518a1c3
2 changed files with 22 additions and 7 deletions

View File

@@ -70,14 +70,14 @@ anneng:
app_path: 'D:\SoftWare\SoftWare Installation\@ane-electron-uiapp\安能全网门户.exe'
# ----------------------------------------------------------------------------
# PostgreSQL 数据持久化(到货核销数据入库,详见 db_store.py
# PostgreSQL 数据持久化(到货核销数据入库,详见 store.py
# ----------------------------------------------------------------------------
# createdb 会连接名为 postgres 的维护库来创建下方 dbname 指定的数据库。
# 命令行:
# python db_store.py createdb 创建数据库(幂等)
# python db_store.py init 建表(幂等)
# python db_store.py ingest [site] 入库全站或单站(幂等 UPSERT
# python db_store.py all createdb → init → 全站 ingest
# python -m inbound_verify.store createdb 创建数据库(幂等)
# python -m inbound_verify.store init 建表(幂等)
# python -m inbound_verify.store ingest [site] 入库全站或单站(幂等 UPSERT
# python -m inbound_verify.store all createdb → init → 全站 ingest
postgres:
host: 127.0.0.1
port: 5432
@@ -87,3 +87,7 @@ postgres:
dbname: CQHXDB
# 承载到货核销表的专用 schema隔离 public表建在此 schema 下。
schema: inbound_verify
# 下载成功后自动入库(钩子,见 runtime._persist_to_dbfalse=跳过(无 PG/cpolar 的开发机)。
auto_ingest: true
# PG 连接超时cpolar 抖动时快速失败,不拖垮下载 worker。
connect_timeout_seconds: 5