Files
xiaobai a089da31cd feat: 维护台 maintain(巡检/补号/日志)+ 配置与 .gitignore
- Flask 控制台:Cliproxy 巡检、批量补号、流水线、运行日志
- codex_stats_oauth_dir 支持统计 Cliproxy auth 目录
- 忽略 accounts/oauth、.venv、本地 DB/日志与 new.py

Made-with: Cursor
2026-03-21 20:51:55 +08:00

26 lines
842 B
Python
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.
#!/usr/bin/env python3
"""CPA 定时同步入口:定时执行 run.py,迁出 oauth JSON,钉钉通知。
用法:
cd /path/to/protocol_chatgpt
pip install -r requirements.txt
cp .env.cpa-runner.example .env.cpa-runner # 按需修改
python scripts/cpa_runner.py
若维护台已开启「流水线 → 启用定时流水线」,请勿再运行本脚本(会抢同一套 oauth 目录与全局锁逻辑外的文件锁)。
仅在不跑 `python -m maintain`、或维护台未启用定时流水线时使用;勿起第二个 cpa_runner(`cpa_runner.lock`)。
"""
from __future__ import annotations
import sys
from pathlib import Path
REPO = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(REPO))
from maintain.cpa_runner_core import main_blocking # noqa: E402
if __name__ == "__main__":
main_blocking()