|
@ -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秒
|