feat: add sleep in push

pull/2608/head
icey-yu 5 months ago
parent 5c4f23b3fa
commit 7a35975ba1

@ -86,6 +86,8 @@ func (o *OnlineCache) initUsersOnlineStatus(ctx context.Context) error {
totalSet int totalSet int
) )
time.Sleep(time.Second * 10)
defer func(t time.Time) { defer func(t time.Time) {
log.ZWarn(ctx, "init users online status end", nil, "cost", time.Since(t), "totalSet", totalSet) log.ZWarn(ctx, "init users online status end", nil, "cost", time.Since(t), "totalSet", totalSet)
}(time.Now()) }(time.Now())
@ -186,7 +188,7 @@ func (o *OnlineCache) GetUsersOnline(ctx context.Context, userIDs []string) ([]s
onlineUserIDs = make([]string, 0, len(userIDs)) onlineUserIDs = make([]string, 0, len(userIDs))
offlineUserIDs = make([]string, 0, len(userIDs)) offlineUserIDs = make([]string, 0, len(userIDs))
) )
//
//userOnlineMap, err := o.getUserOnlinePlatformBatch(ctx, userIDs) //userOnlineMap, err := o.getUserOnlinePlatformBatch(ctx, userIDs)
//if err != nil { //if err != nil {
// return nil, nil, err // return nil, nil, err

Loading…
Cancel
Save