fix: 补充 heartbeat 接口更新 runer.last_heartbeat_timestamp value

This commit is contained in:
shizhendong
2024-07-19 17:52:42 +08:00
parent c0623e8ca5
commit 5e52c711bc

View File

@@ -97,6 +97,11 @@ public class RunnerController {
return;
}
// update last_heartbeat_timestamp
runnerService.update(new LambdaUpdateWrapper<RunnerEntity>()
.set(RunnerEntity::getLastHeartbeatTimestamp, System.currentTimeMillis())
.eq(RunnerEntity::getId, runner.getId()));
// findjob by platform
String platform = platformMap.entrySet().stream().filter(entry -> entry.getValue() > 0).findFirst().map(entry -> entry.getKey()).orElseGet(null);
JobEntity job = jobService.assignPendingJob(runner.getId(), platform);