REQ-3345: 群聊天消息过滤

This commit is contained in:
yanglin 2025-02-19 16:16:00 +08:00
parent ea8b2f623d
commit 7e6966865f
2 changed files with 2 additions and 1 deletions

View File

@ -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() {

View File

@ -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);
} }