feat: sleep

pull/2608/head
icey-yu 4 months ago
parent f7eb050457
commit 09fc762a58

@ -26,6 +26,7 @@ func NewOnlineCache(user rpcclient.UserRpcClient, group *GroupLocalCache, rdb re
switch x.fullUserCache { switch x.fullUserCache {
case true: case true:
time.Sleep(time.Second * 5)
x.mapCache = cacheutil.NewCache[string, []int32]() x.mapCache = cacheutil.NewCache[string, []int32]()
if err := x.initUsersOnlineStatus(mcontext.SetOperationID(context.TODO(), strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10))); err != nil { if err := x.initUsersOnlineStatus(mcontext.SetOperationID(context.TODO(), strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10))); err != nil {
return nil, err return nil, err

Loading…
Cancel
Save