优化日志输出,修复重试机制问题
This commit is contained in:
@@ -89,6 +89,7 @@ func stopChannels(ctx context.Context, curr time.Time) error {
|
||||
}
|
||||
ids[i] = int32(id)
|
||||
}
|
||||
slog.Debug("stopChannels", slog.String("result", strings.Join(result, ",")))
|
||||
|
||||
// 删除过期的 channel
|
||||
body, err := json.Marshal(map[string]any{
|
||||
@@ -112,7 +113,9 @@ func stopChannels(ctx context.Context, curr time.Time) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func(Body io.ReadCloser) {
|
||||
_ = Body.Close()
|
||||
}(resp.Body)
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
|
||||
Reference in New Issue
Block a user