Commit c0423366 by huangfusuper

执行节点监控

parent cd5f78bd
...@@ -20,6 +20,10 @@ public class UnfinishedNodeMonitoringRunHelper extends BaseThreadRunHelper { ...@@ -20,6 +20,10 @@ public class UnfinishedNodeMonitoringRunHelper extends BaseThreadRunHelper {
* 心跳 * 心跳
*/ */
private static final String PENG = "PENG"; private static final String PENG = "PENG";
/**
* 心跳前缀
*/
private static final String HEARTBEAT = "HEARTBEAT_";
private final StringRedisTemplate stringRedisTemplate; private final StringRedisTemplate stringRedisTemplate;
private final JobTaskRunLogService jobTaskRunLogService; private final JobTaskRunLogService jobTaskRunLogService;
...@@ -32,7 +36,11 @@ public class UnfinishedNodeMonitoringRunHelper extends BaseThreadRunHelper { ...@@ -32,7 +36,11 @@ public class UnfinishedNodeMonitoringRunHelper extends BaseThreadRunHelper {
public Long start() { public Long start() {
List<JobTaskRunLog> tempRunNodeList = jobTaskRunLogService.findTempRunNodeList(); List<JobTaskRunLog> tempRunNodeList = jobTaskRunLogService.findTempRunNodeList();
if (CollectionUtil.isNotEmpty(tempRunNodeList)) { if (CollectionUtil.isNotEmpty(tempRunNodeList)) {
tempRunNodeList.forEach(nodeLog -> stringRedisTemplate.opsForList().rightPush(nodeLog.getRunId(), PENG)); tempRunNodeList.forEach(nodeLog -> {
String runId = nodeLog.getRunId();
String key = HEARTBEAT + runId;
stringRedisTemplate.opsForList().rightPush(key, PENG);
});
} }
return 5000L; return 5000L;
} }
......
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