Skip to content

Commit

Permalink
e2e修改
Browse files Browse the repository at this point in the history
  • Loading branch information
juniaoshaonian committed Sep 28, 2023
1 parent a894214 commit ad2f3e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion gorm_mq/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ type MqConsumer struct {
name string
groupId string
locker sync.RWMutex
corsor int64
// 每次至多消费多少
limit int
// 抢占超时时间
Expand Down
6 changes: 3 additions & 3 deletions gorm_mq/mq.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import (
"context"
"errors"
"fmt"
"github.com/ecodeclub/mq-sql/gorm_mq/balancer/equal_divide"
"log"
"sync"
"time"

"github.com/ecodeclub/mq-sql/gorm_mq/balancer/equal_divide"

"github.com/ecodeclub/ekit/syncx"
"github.com/ecodeclub/mq-api"
"github.com/ecodeclub/mq-sql/gorm_mq/domain"
Expand Down Expand Up @@ -121,7 +122,6 @@ func (m *Mq) Topic(name string, partition int) error {

func (tp *Topic) Close() error {
tp.lock.Lock()
defer tp.lock.Unlock()
tp.once.Do(func() {
for _, ch := range tp.msgCh {
close(ch)
Expand All @@ -130,7 +130,7 @@ func (tp *Topic) Close() error {
close(ch)
}
})

tp.lock.Unlock()
return nil
}

Expand Down

0 comments on commit ad2f3e4

Please sign in to comment.