Commit 2028369e by huangfusuper

redis判空判断

parent 598e341c
...@@ -152,10 +152,12 @@ public class MythJobProcess implements Callable<String>{ ...@@ -152,10 +152,12 @@ public class MythJobProcess implements Callable<String>{
if (this.process.isAlive()){ if (this.process.isAlive()){
this.process.destroy(); this.process.destroy();
} }
RunLog runLog = RunLog.builder().isEnd(true).isSuccess(exitCode == 0 ? true : false).build(); if (stringRedisTemplate != null) {
//stringRedisTemplate.convertAndSend(runKey, JSON.toJSONString(runLog, WriteClassName)) RunLog runLog = RunLog.builder().isEnd(true).isSuccess(exitCode == 0 ? true : false).build();
//TODO 向队尾追加一个日志 //stringRedisTemplate.convertAndSend(runKey, JSON.toJSONString(runLog, WriteClassName))
stringRedisTemplate.opsForList().rightPush(runKey , JSON.toJSONString(runLog, WriteClassName)); //TODO 向队尾追加一个日志
stringRedisTemplate.opsForList().rightPush(runKey , JSON.toJSONString(runLog, WriteClassName));
}
return outputGobbler.getRecentLog() + "\n" + errorGobbler.getRecentLog(); return outputGobbler.getRecentLog() + "\n" + errorGobbler.getRecentLog();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment