mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: worker heartbeat use wrong thread pool
This commit is contained in:
parent
fadf2ce14e
commit
e6d32c9a05
@ -2,9 +2,11 @@ package tech.powerjob.server.remote.server.self;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.boot.info.BuildProperties;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import tech.powerjob.common.exception.PowerJobException;
|
||||
import tech.powerjob.common.utils.CommonUtils;
|
||||
import tech.powerjob.common.utils.NetUtils;
|
||||
import tech.powerjob.server.common.constants.PJThreadPool;
|
||||
import tech.powerjob.server.common.module.ServerInfo;
|
||||
import tech.powerjob.server.extension.LockService;
|
||||
import tech.powerjob.server.persistence.remote.model.ServerInfoDO;
|
||||
@ -86,6 +88,7 @@ public class ServerInfoServiceImpl implements ServerInfoService {
|
||||
log.info("[ServerInfoService] ip:{}, id:{}, cost:{}", ip, serverInfo.getId(), sw);
|
||||
}
|
||||
|
||||
@Async(PJThreadPool.TIMING_POOL)
|
||||
@Scheduled(fixedRate = 15000, initialDelay = 15000)
|
||||
public void heartbeat() {
|
||||
serverInfoRepository.updateGmtModifiedByIp(serverInfo.getIp(), new Date());
|
||||
|
Loading…
x
Reference in New Issue
Block a user