update
This commit is contained in:
+12
-3
@@ -32,9 +32,17 @@ uv run ruff check .
|
||||
## Gold Cache and Notifications
|
||||
|
||||
- Application startup checks both realtime and official gold caches, then checks
|
||||
them every minute. Data older than 30 minutes refreshes without HTTP traffic.
|
||||
them at wall-clock minute boundaries. Each half-hour batch starts 5 minutes
|
||||
early: 01:25 collects the 01:30 batch, 01:55 collects the 02:00 batch, without
|
||||
HTTP traffic. All regions in a refresh share the batch timestamp selected at
|
||||
the start, even if the work crosses a half-hour boundary. Existing public
|
||||
`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.
|
||||
- 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.
|
||||
@@ -46,8 +54,9 @@ uv run ruff check .
|
||||
included in notification text or logged push errors.
|
||||
- Official gold responses also contain `max` and `min`: the largest/smallest
|
||||
values of `10000 / price` across both rank arrays, in 万金币 per 100点券,
|
||||
rounded to 4 decimals. Nonpositive/invalid prices are excluded; absent valid
|
||||
quotes yield `null`. Existing rank arrays retain their 点券 per 100万金币 unit.
|
||||
rounded to 2 decimals. Nonpositive/invalid prices are excluded; absent valid
|
||||
quotes yield `null`. Rank arrays retain their 点券 per 100万金币 unit and are
|
||||
also rounded to 2 decimals. JSON numbers do not force trailing zeroes.
|
||||
|
||||
## Compatibility Rules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user