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