feat(contract-payment): 采购合同付款预警

This commit is contained in:
sophie committed 2026-09-02 11:27:10 +08:00
1 parent 5aa431cc8e
commit 03e5e88e27
113 files changed
+11381 -2991

No files matched your search

+11
View File
@@ -75,6 +75,17 @@ def main(
app = create_app(resolved_config)
queue_names = queues or ['kb']
# 启动期诊断:确认合同付款 ERP 回查的运行时配置状态(只标记是否就绪,不输出密码)。
_erp_dsn = str(app.config.get("CONTRACT_PAYMENT_ERP_DSN") or "").strip()
_erp_user = str(app.config.get("CONTRACT_PAYMENT_ERP_USERNAME") or "").strip()
_erp_pwd = str(app.config.get("CONTRACT_PAYMENT_ERP_PASSWORD") or "")
logger.info(
"合同付款预警 ERP 回查配置: dsn=%s 用户名=%s 密码=%s",
"✓就绪" if _erp_dsn else "✗缺失",
"✓就绪" if _erp_user else "✗缺失",
"✓就绪" if _erp_pwd else "✗缺失",
)
if queue_names == ['schedule'] and not bool(app.config.get('SCHEDULE_WORKER_ENABLED', True)):
logger.info('Schedule worker disabled by SCHEDULE_WORKER_ENABLED=false')
return