mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-10 20:15:59 +08:00
cobra
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"OpenIM/pkg/common/db/unrelation"
|
||||
"OpenIM/pkg/common/prome"
|
||||
"fmt"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type MsgTransfer struct {
|
||||
@@ -64,6 +65,8 @@ func (m *MsgTransfer) initPrometheus() {
|
||||
}
|
||||
|
||||
func (m *MsgTransfer) Start(prometheusPort int) error {
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(4)
|
||||
if config.Config.ChatPersistenceMysql {
|
||||
go m.persistentCH.persistentConsumerGroup.RegisterHandleAndConsumer(m.persistentCH)
|
||||
} else {
|
||||
@@ -76,5 +79,6 @@ func (m *MsgTransfer) Start(prometheusPort int) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
wg.Wait()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user