mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 14:56:47 +00:00
Tighten the "prune peers" interval; move from fixed-rate to fixed-delay scheduling.
This commit is contained in:
1 parent
7b3ed2dcbf
commit
0a843dc086
1 file changed
+2
-2
+2
-2
@@ -66,7 +66,7 @@ public class ClientPresenceManager extends RedisClusterPubSubAdapter<String, Str
|
||||
private final Meter remoteDisplacementMeter;
|
||||
private final Meter pubSubMessageMeter;
|
||||
|
||||
private static final int PRUNE_PEERS_INTERVAL_SECONDS = (int)Duration.ofMinutes(3).toSeconds();
|
||||
private static final int PRUNE_PEERS_INTERVAL_SECONDS = (int)Duration.ofSeconds(30).toSeconds();
|
||||
|
||||
static final String MANAGER_SET_KEY = "presence::managers";
|
||||
|
||||
@@ -115,7 +115,7 @@ public class ClientPresenceManager extends RedisClusterPubSubAdapter<String, Str
|
||||
|
||||
presenceCluster.useCluster(connection -> connection.sync().sadd(MANAGER_SET_KEY, managerId));
|
||||
|
||||
pruneMissingPeersFuture = scheduledExecutorService.scheduleAtFixedRate(() -> {
|
||||
pruneMissingPeersFuture = scheduledExecutorService.scheduleWithFixedDelay(() -> {
|
||||
try {
|
||||
pruneMissingPeers();
|
||||
} catch (final Throwable t) {
|
||||
|
||||
Reference in new issue
Block a user