refactor: rename expected_undelivered to compare

git mv expected_undelivered.py -> compare.py; update the 3 importers (store/runtime/router) to import compare. All public names (main, write_site_file, _read_business_dates) unchanged. Also add the Tier 2 plan doc.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-07-24 08:40:04 +08:00
parent 91ef8970b8
commit 23042c272b
5 changed files with 412 additions and 11 deletions

View File

@@ -26,7 +26,7 @@ from inbound_verify.domain import SITE_UNDELIVERED_FILE
from inbound_verify import state_store
from inbound_verify.sites import shunxin, baishi, zto, yunda, anneng
from inbound_verify import expected_undelivered # dispatch 的 compare 任务用
from inbound_verify import compare # dispatch 的 compare 任务用
# 各网页站点首页 URL单一来源取自各站点模块 HOME_URL
SITES_CONFIG = {
@@ -444,7 +444,7 @@ def _site_undelivered_handler(site):
(TASK_HANDLERS[(site, "actual")](ctx) is not False) if exp_ok else False
)
if exp_ok and act_ok:
return expected_undelivered.write_site_file(site)
return compare.write_site_file(site)
stale = os.path.join(DOWNLOAD_DIR, SITE_UNDELIVERED_FILE.format(name=site))
if os.path.exists(stale):
os.remove(stale)
@@ -472,7 +472,7 @@ TASK_HANDLERS = {
("安能", "expected"): lambda ctx: anneng.anneng_expected_download(),
("安能", "actual"): lambda ctx: anneng.anneng_actual_download(),
("安能", "undelivered"): _site_undelivered_handler("安能"),
("__compare__", "compare"): lambda ctx: (expected_undelivered.main() or True),
("__compare__", "compare"): lambda ctx: (compare.main() or True),
}