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