mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-02 18:32:08 +08:00
heartbeat表的数据更新时间从MySQL自动生成调整为Logi-KM的时间
This commit is contained in:
@@ -10,6 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author limeng
|
||||
* @date 20/8/10
|
||||
@@ -30,6 +32,7 @@ public class Heartbeat {
|
||||
HeartbeatDO heartbeatDO = new HeartbeatDO();
|
||||
heartbeatDO.setIp(NetUtils.localIp());
|
||||
heartbeatDO.setHostname(NetUtils.localHostname());
|
||||
heartbeatDO.setModifyTime(new Date());
|
||||
heartbeatDao.replace(heartbeatDO);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("flush heartbeat failed.", e);
|
||||
|
||||
Reference in New Issue
Block a user