Skip to content

Commit

Permalink
```
Browse files Browse the repository at this point in the history
修复InitSyncTask中对记录未找到错误的处理

之前,如果rep.GetNewMessageContent返回记录未找到的错误,InitSyncTask函数会错误地继续执行而忽略该错误。现在,该错误将被正确设置为nil,避免不必要的循环迭代。
```
  • Loading branch information
lw396 committed Aug 6, 2024
1 parent cae214d commit 00cc64c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions service/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func (a *Service) InitSyncTask(ctx context.Context) (err error) {
data, err = a.rep.GetNewMessageContent(ctx, msgName)
if err != nil {
if db.IsRecordNotFound(err) {
err = nil
continue
}
return
Expand Down

0 comments on commit 00cc64c

Please sign in to comment.