fix(grokpool): 导入新凭据不再触发全量巡检,避免搞坏已有账号 - #11
Merged
Conversation
问题:铸造/导入一个账号后,importFiles 会立即触发 signalWake() + nextRun=now,导致全量巡检遍历号池中所有账号。巡检时网络波动或 Cloudflare 挑战会导致好账号被误判为 reauth/delete,搞坏已有账号。 修复: - 去掉 importFiles 中的 signalWake + nextRun=now + rerunRequested - 新增 inspectAccountsOnly(ids),只对刚导入的账号做单独探测 - 定时巡检不受影响(按设置的间隔正常运行) - 每个账号的凭据文件和 Store 完全隔离,不会串号
Owner
|
全量巡检这个功能是我设计的不周到,因为每次巡检都是凭空消耗额度,所以我一般都是注册成功之后关闭巡检功能,直接使用,取消全量巡检是很有必要的,感谢你的贡献 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
铸造(mint)或导入一个新账号后,
importFiles会立即触发signalWake()+nextRun = now,导致全量巡检遍历号池中所有账号。巡检时如果遇到网络波动 / 代理不稳 / Cloudflare 挑战,好账号会被误判为reauth/delete,凭据被标记为异常甚至删除。用户反馈:铸造一个需要重新登录的账号后,号池里其他所有账号都被重新巡检了一遍,导致很多好账号也被搞坏了。
根因
导入 1 个凭据 → 立即全量巡检 → 遍历全部账号 → 网络波动时好账号被误杀。
修复
importFiles中的signalWake()+nextRun = now+rerunRequested = trueinspectAccountsOnly(ids []string),只对刚导入的账号做单独探测 +recordInspection安全性
accounts/<id>.json)和 Store 完全隔离inspectAccountsOnly与正在运行的全量巡检可安全并发(recordInspection有 mutex 保护)inspectAccount调用的accountStore(id).Token()是每个账号独立的