This commit is contained in:
2026-11-04 15:52:50 +08:00
parent 62291c57ec
commit cc66e98f61
6 changed files with 41 additions and 26 deletions
+5 -4
View File
@@ -39,10 +39,11 @@ uv run ruff check .
`updataTime` types remain number for realtime and string for official.
Redis locks prevent duplicate work across workers. Realtime region pages stay
8 seconds apart. Failures retain the last successful data for up to 24 hours.
- Realtime uses the arithmetic mean of displayed unit prices from rows 4–10
(`i.item1`, slice `[3:10]`), in 元/万金币, rounded to 2 decimals. This replaces
the earlier 万金币/元 average and uses a new Redis namespace so old units are
never returned as new prices. No BeautifulSoup or browser dependency is added.
- Realtime selects rows 4–10 (slice `[3:10]`), converts each original unit price
with `1 / Price`, then averages those ratios in 万金币/元. Rounding to 2 decimals
happens only after averaging; prices are not rounded before conversion. A new
Redis namespace excludes the earlier 元/万金币 cache, whose rounded prices
cannot recover the original ratios. No new dependency is added.
- Official authentication uses `HELPER_TOKEN` and `HELPER_ID`. Authentication
failures (`returnCode=-30003`, explicit token-expiry messages or HTTP 401) can
notify via Bark. Network errors do not trigger token-expiry notifications.