update
This commit is contained in:
@@ -188,16 +188,18 @@ public class RedisTools {
|
||||
private static boolean init = false;
|
||||
|
||||
public static void initRedisPoolSub() {
|
||||
if (init)
|
||||
if (init) {
|
||||
return;
|
||||
}
|
||||
init = true;
|
||||
System.out.println("初始化订阅");
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Jedis jedis = getPoolRedis();
|
||||
if (jedis != null)
|
||||
if (jedis != null) {
|
||||
jedis.psubscribe(new Consumer(), "*");
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user