yeshijie %!s(int64=7) %!d(string=hai) anos
pai
achega
23bb7a273c

+ 2 - 2
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/redis/RedisThread.java

@ -25,9 +25,9 @@ public class RedisThread implements Runnable {
    public void run() {
        String key = SystemConf.getInstance().getSystemProperties().getProperty("redis_prescription_title");
        while (true){
            redisTemplate.watch(key);
//            redisTemplate.watch(key);
            String message = redisTemplate.opsForList().rightPop(key);
            redisTemplate.unwatch();
//            redisTemplate.unwatch();
            if(StringUtils.isEmpty(message)){
                try{
                    Thread.sleep(1000L);//如果没有读取到记录,等待1秒