[agent]-[executor] redis listener container optimize
This commit is contained in:
@@ -19,10 +19,12 @@ public class RedisConfiguration {
|
||||
redisTemplate.setConnectionFactory(redisConnectionFactory);
|
||||
|
||||
GenericJackson2JsonRedisSerializer jsonRedisSerializer = new GenericJackson2JsonRedisSerializer();
|
||||
|
||||
redisTemplate.setKeySerializer(RedisSerializer.string());
|
||||
redisTemplate.setHashKeySerializer(RedisSerializer.string());
|
||||
redisTemplate.setValueSerializer(jsonRedisSerializer);
|
||||
redisTemplate.setHashValueSerializer(jsonRedisSerializer);
|
||||
|
||||
return redisTemplate;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ public class StreamSender {
|
||||
StreamSenderEntity streamSenderEntity = AllNeededStreamSender.get(streamKey);
|
||||
streamSenderEntity.setWaitToSendLog(false);
|
||||
|
||||
|
||||
batchSendLog(streamKey);
|
||||
}
|
||||
|
||||
@@ -139,12 +138,11 @@ public class StreamSender {
|
||||
|
||||
private boolean send(String streamKey, List<String> content) {
|
||||
|
||||
|
||||
try {
|
||||
|
||||
String resultContent = objectMapper.writeValueAsString(content);
|
||||
return this.send(streamKey, resultContent);
|
||||
|
||||
return this.send(streamKey, resultContent);
|
||||
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
||||
@@ -32,7 +32,9 @@ public class LogToArrayListCache {
|
||||
ArrayList<String> commandCachedLog = this.getExecutionCmdCachedLogArrayList(streamKey);
|
||||
|
||||
String format = String.format("execution command are => [ %s ]", process.info().commandLine().get());
|
||||
|
||||
// add the command
|
||||
commandCachedLog.add("");
|
||||
commandCachedLog.add(format);
|
||||
commandCachedLog.add("--------------- command result are as below --------------------");
|
||||
commandCachedLog.add("");
|
||||
|
||||
Reference in New Issue
Block a user