mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 19:32:17 +08:00 
			
		
		
		
	feat: add sleep in push
This commit is contained in:
		
							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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user