feat: implement S2A authentication flow, Codex token management, and related utilities.
This commit is contained in:
@@ -785,10 +785,14 @@ func processSingleTeam(idx int, req TeamProcessRequest) (result TeamProcessResul
|
||||
return false
|
||||
}
|
||||
if attempt > 0 {
|
||||
// 重试前等待一段时间,避免密集请求
|
||||
// 重试前等待一段时间,避免密集请求(可被停止信号中断)
|
||||
retryDelay := time.Duration(3+attempt*2) * time.Second
|
||||
logger.Warning(fmt.Sprintf("%s 入库重试 (第%d次, 等待 %ds)", memberLogPrefix, attempt+1, int(retryDelay.Seconds())), memberEmail, "team")
|
||||
time.Sleep(retryDelay)
|
||||
select {
|
||||
case <-time.After(retryDelay):
|
||||
case <-teamProcessState.stopCh:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// 每次尝试都从代理池获取新代理(避免复用失败代理)
|
||||
|
||||
@@ -55,9 +55,9 @@ export function useTeamStatus(pollInterval = 3000) {
|
||||
const processData = data.data as TeamProcessStatus
|
||||
newStatus.isProcessing = processData.running
|
||||
newStatus.processingTeams = processData.running
|
||||
? processData.total_teams - processData.completed
|
||||
? Math.max(0, processData.total_teams - processData.completed)
|
||||
: 0
|
||||
newStatus.processedTeams = processData.completed
|
||||
newStatus.processedTeams = Math.min(processData.completed, processData.total_teams)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user