fix: 修复 collector_loop 常量名(NameError)并填充核心股所属题材

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sakurasan
2026-08-10 19:49:36 +08:00
co-authored by Claude
parent 14c31e3f06
commit 526b182051
2 changed files with 18 additions and 7 deletions
@@ -211,7 +211,7 @@ async def collector_loop(stop: Optional[asyncio.Event] = None) -> None:
while True:
try:
now = datetime.now(_CST)
if _is_trading_day(now) and now.time() >= _COLLECT_AFTER_TIME:
if _is_trading_day(now) and now.time() >= COLLECT_AFTER_TIME:
trade_date = now.strftime("%Y-%m-%d")
if not _has_collected(trade_date):
await collect_daily(trade_date)
@@ -219,7 +219,7 @@ async def collector_loop(stop: Optional[asyncio.Event] = None) -> None:
print(f"[collector] 采集异常: {e}")
if stop is not None and stop.is_set():
break
await asyncio.sleep(_CHECK_INTERVAL_SECONDS)
await asyncio.sleep(CHECK_INTERVAL_SECONDS)
```
> 注:上面代码中 `_CORE_STOCK_LIMIT` 应为 `CORE_STOCK_LIMIT`(变量名一致),下面 Step 2 统一修正。