26 lines
692 B
Python
26 lines
692 B
Python
"""
|
|
只读清点目标数据库中的 APX 运行态。
|
|
|
|
用法:在目标环境加载现有环境变量后执行 `python scripts/audit_apx_runtime_state.py`。
|
|
本脚本只执行查询并输出 JSON,不迁移、不取消、不删除任何记录。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
|
|
from app import create_app
|
|
from app.services.shipping_notice.apx_runtime_audit import audit_apx_runtime_state
|
|
|
|
|
|
def main() -> None:
|
|
"""加载生产配置并输出 APX 只读清点结果。"""
|
|
app = create_app()
|
|
with app.app_context():
|
|
print(json.dumps(audit_apx_runtime_state(), ensure_ascii=False, indent=2, sort_keys=True))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|
|
|