REQ-3345: 群聊天消息过滤
This commit is contained in:
parent
ea8b2f623d
commit
7e6966865f
@ -26,6 +26,7 @@ public class GroupProps {
|
||||
private int removeMemberTps = 15;
|
||||
private int getGroupInfoTps = 15;
|
||||
private int changeOwnerTps = 15;
|
||||
private double tpsTooLowWarnWaitSeconds = 1.5;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -69,7 +69,7 @@ public class GroupRateLimiter implements InitializingBean {
|
||||
|
||||
public void acquire() {
|
||||
double seconds = rateLimiter.acquire();
|
||||
if (seconds > 1)
|
||||
if (seconds > groupProps.getTpsTooLowWarnWaitSeconds())
|
||||
notification.send("{} wait too long to acquire rate limiter: {} seconds", name, seconds);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user