123
This commit is contained in:
@@ -51,7 +51,7 @@ public class LoginNotifyHandle implements IHandle {
|
||||
// 上线通知
|
||||
String loginNoticeFansLock = LockManager.getLoginNoticeFansLock(loginNotify.getUserId());
|
||||
RBucket<String> bucket = redissonClient.getBucket(loginNoticeFansLock);
|
||||
boolean boo = bucket.setIfAbsent("cai", Duration.ofMinutes(60));
|
||||
boolean boo = bucket.setIfAbsent("cai", Duration.ofHours(5)); // 5小时只通知一次
|
||||
if(boo){
|
||||
sendOnlineNotice(loginNotify.getUserId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user