GUI 日志落盘,修复同一奖品重复兑换与监控结束竞态
- 日志落盘:新增 internal/gui/logfile.go,写到 <用户配置目录>/huya-go/logs/huya-go.log,单文件 5MB 后滚动保留 5 个备份;「日志」页签顶部显示路径并支持打开目录/复制路径;写盘失败自动降级为仅界面输出 - 修复重复兑换:界面选品会同时提交 pid、名称与 targetText 里的同一 pid,normalizeTargets 现按 pid/名称去重;runState 再按「账号+奖品」记账,多个 target 命中同一奖品时只兑换一次(新增 skip_duplicate 结果) - 修复 use of closed network connection:成功后的异步刷新改为 runState.refresh 等待,RunTargets 返回前不再提前关闭连接 - queryHttpDns 增加 single-flight 与失败冷却,多账号并发建连只解析一次 - 新增 internal/gui/logfile_test.go 与 sniper/huya 回归测试;README 补日志说明
This commit is contained in:
@@ -10,6 +10,10 @@ export function Exchange(arg1) {
|
||||
return window['go']['gui']['App']['Exchange'](arg1);
|
||||
}
|
||||
|
||||
export function GetLogFilePath() {
|
||||
return window['go']['gui']['App']['GetLogFilePath']();
|
||||
}
|
||||
|
||||
export function GetLogs() {
|
||||
return window['go']['gui']['App']['GetLogs']();
|
||||
}
|
||||
@@ -26,6 +30,10 @@ export function ListPrizes(arg1) {
|
||||
return window['go']['gui']['App']['ListPrizes'](arg1);
|
||||
}
|
||||
|
||||
export function OpenLogDir() {
|
||||
return window['go']['gui']['App']['OpenLogDir']();
|
||||
}
|
||||
|
||||
export function PreviewAccounts(arg1) {
|
||||
return window['go']['gui']['App']['PreviewAccounts'](arg1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user