Files
InboundVerify/config.example.yaml
Misaka_Company 5e4889e845 docs: sync docs with current package layout and auto-ingest hook
- config.example.yaml: replace stale site_yunda/main_router with new
  module paths (sites.yunda, runtime)
- CLAUDE.md: add ingest-one to DB CLI list; new subsection documenting
  the download->PostgreSQL auto-ingest hook (_persist_to_db, ingest_task,
  ingest_state, /status.ingest, auto_ingest config)
- README.md: store tree comment lists all 5 CLI commands (add ingest-one)
- docs: /status row notes the ingest field; anneng CDP guide snippet
  gets timeout=15
- cli/server.py: docstring run command -> python -m inbound_verify.cli.server

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-24 12:35:54 +08:00

94 lines
5.0 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# config.example.yaml
# ============================================================================
# 复制本文件为 config.yaml 并填入真实凭据后使用:
# cp config.example.yaml config.yaml
#
# 说明:
# - config.yaml 已被 .gitignore 忽略,不会提交到仓库,可安全存放凭据。
# - 所有配置项均设有默认值,未填写时会自动回退到默认行为,不会报错。
# ============================================================================
# ----------------------------------------------------------------------------
# 调试模式:用于单网点联调,仅挂载并启动指定网点,其余网点不加载。
# ----------------------------------------------------------------------------
debug:
# 是否启用调试模式true=仅启动 target_site 一个网点false=全量启动所有网点)。
enabled: false
# 调试模式下要单独启动的网点名称。
# 仅在 enabled: true 时生效。可选值:顺心 / 百世 / 中通 / 韵达 / 安能。
# 留空或不匹配时将回退为全量模式。
target_site: ""
# ----------------------------------------------------------------------------
# 顺心捷达 (https://sxne.sxjdfreight.com)
# ----------------------------------------------------------------------------
shunxin:
# 【已废弃】下载日期改由 Web 前端/API 按站点设偏移0=今天1=昨天…,存 state.db此项不再生效。
query_days: 1
# ----------------------------------------------------------------------------
# 百世快运 (https://v5.800best.com)
# ----------------------------------------------------------------------------
baishi:
# 应到未到数据导出时需要填写的“登录密码”。
# 留空会导致导出授权校验失败,无法下载数据。
password: "YOUR_PASSWORD_HERE"
# ----------------------------------------------------------------------------
# 中通快运 (https://ws.zto56.com/)
# ----------------------------------------------------------------------------
zto:
# 【已废弃】下载日期改由 Web 前端/API 按站点设偏移0=今天1=昨天…,存 state.db此项不再生效。
query_days: 1
# ----------------------------------------------------------------------------
# 韵达快运 (https://ky-sso.yunda56.com)
# ----------------------------------------------------------------------------
yunda:
# 自动登录的账号与密码(由 inbound_verify.sites.yunda.yunda_login 读取并填入登录表单)。
# 留空时自动登录会填入空串导致登录失败,届时可在浏览器中改为手动登录。
# 真实凭据仅写进被 .gitignore 忽略的 config.yaml切勿提交示例值。
username: "YOUR_USERNAME_HERE"
password: "YOUR_PASSWORD_HERE"
# 【已废弃】下载日期改由 Web 前端/API 按站点设偏移0=今天1=昨天…,存 state.db此项不再生效。
query_days: 1
# ----------------------------------------------------------------------------
# 安能全网门户Electron 桌面应用,非网页)
# ----------------------------------------------------------------------------
# 与其他站点不同:安能不由浏览器打开,而是以调试模式启动其
# Electron 可执行文件(自动选取一个空闲端口作为 --remote-debugging-port避免端口冲突
# 启动后请在应用内手动登录runtime 会自动轮询判断是否进入主页。
anneng:
# 【已废弃】下载日期改由 Web 前端/API 按站点设偏移0=今天1=昨天…,存 state.db此项不再生效。
query_days: 1
# 安能 Electron 应用的可执行文件路径。
# 路径含反斜杠/空格/@用单引号包裹即可YAML 单引号串按字面解析)。
app_path: 'D:\SoftWare\SoftWare Installation\@ane-electron-uiapp\安能全网门户.exe'
# ----------------------------------------------------------------------------
# PostgreSQL 数据持久化(到货核销数据入库,详见 store.py
# ----------------------------------------------------------------------------
# createdb 会连接名为 postgres 的维护库来创建下方 dbname 指定的数据库。
# 命令行:
# 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
user: postgres
# 连接密码config.yaml 已 gitignore真实凭据只写在那里切勿提交示例值。
password: "YOUR_PASSWORD_HERE"
dbname: CQHXDB
# 承载到货核销表的专用 schema隔离 public表建在此 schema 下。
schema: inbound_verify
# 下载成功后自动入库(钩子,见 runtime._persist_to_dbfalse=跳过(无 PG/cpolar 的开发机)。
auto_ingest: true
# PG 连接超时cpolar 抖动时快速失败,不拖垮下载 worker。
connect_timeout_seconds: 5