fix: address audit findings - cache sync, validation, consistency
- clearCreditsExhausted: sync Redis scheduler cache after DB update - Image billing mode UI: write to per_request_price instead of image_output_price - OpenAI RecordUsage: use BillingModelSourceRequested constant, add s.cfg nil guard - Fix i18n key path: admin.channels.perRequestPriceRequired → admin.channels.form.perRequestPriceRequired
This commit is contained in:
@@ -140,6 +140,10 @@ func (s *AntigravityGatewayService) clearCreditsExhausted(ctx context.Context, a
|
||||
}); err != nil {
|
||||
logger.LegacyPrintf("service.antigravity_gateway", "clear credits exhausted failed: account=%d err=%v", account.ID, err)
|
||||
}
|
||||
// 同步更新 Redis 调度快照,避免其他节点/请求延迟感知
|
||||
if s.schedulerSnapshot != nil {
|
||||
_ = s.schedulerSnapshot.UpdateAccountInCache(ctx, account)
|
||||
}
|
||||
}
|
||||
|
||||
// classifyAntigravity429 将 Antigravity 的 429 响应归类为配额耗尽、限流或未知。
|
||||
|
||||
Reference in New Issue
Block a user