- Fix health check sqlExe calls: add missing ns parameter - Fix accounting ID generation: use getID() instead of uuid4 (VARCHAR length) - Fix accounting request_id: normalize empty to NULL to avoid UNIQUE constraint violation - Fix test_server balance/update route: was incorrectly pointing to accounting handler - Add test_server.py: standalone aiohttp test server for local development - Update conf/config.yaml: local MySQL credentials (test/test) - Update db/schema.sql and scripts/generate_ddl.py for local testing - Fix router sync_status sqlExe call: add missing ns parameter - Fix sync uapi_sync: use correct table/column names
36 lines
580 B
YAML
36 lines
580 B
YAML
# SageAPI 运行配置
|
|
# 环境变量覆盖: SAGEAPI_<SECTION>_<KEY>
|
|
# 示例: SAGEAPI_DATABASE_HOST=10.0.0.1
|
|
|
|
server:
|
|
host: "0.0.0.0"
|
|
port: 8080
|
|
workers: 4
|
|
|
|
database:
|
|
host: "127.0.0.1"
|
|
port: 3306
|
|
dbname: "sageapi_db"
|
|
user: "test"
|
|
password: "test"
|
|
pool_size: 10
|
|
|
|
upstream:
|
|
sage_base_url: "http://127.0.0.1:9180"
|
|
dapi_key: ""
|
|
dapi_secret: ""
|
|
timeout: 30
|
|
|
|
sync:
|
|
interval_seconds: 60
|
|
batch_size: 500
|
|
max_retries: 3
|
|
|
|
cache:
|
|
ttl_seconds: 300
|
|
max_entries: 10000
|
|
|
|
logging:
|
|
level: "INFO"
|
|
format: "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
|