服务访问日志增加今天和历史的访问日志查看

This commit is contained in:
刘祥超
2020-10-31 17:44:53 +08:00
parent 1d91fcc542
commit cdb5dbc4e8
6 changed files with 14 additions and 9 deletions

View File

@@ -87,7 +87,7 @@ func (this *HealthCheckClusterTask) Stop() {
// 单个循环任务
func (this *HealthCheckClusterTask) loop(seconds int64) error {
// 检查上次运行时间,防止重复运行
settingKey := "cluster_health_check_%d" + numberutils.FormatInt64(this.clusterId)
settingKey := models.SettingCodeClusterHealthCheck + numberutils.FormatInt64(this.clusterId)
timestamp := time.Now().Unix()
c, err := models.SharedSysSettingDAO.CompareInt64Setting(settingKey, timestamp-seconds)
if err != nil {

View File

@@ -40,7 +40,7 @@ func (this *NodeMonitorTask) Run() {
func (this *NodeMonitorTask) loop() error {
// 检查上次运行时间,防止重复运行
settingKey := "node_monitor"
settingKey := models.SettingCodeNodeMonitor
timestamp := time.Now().Unix()
c, err := models.SharedSysSettingDAO.CompareInt64Setting(settingKey, timestamp-int64(this.intervalSeconds))
if err != nil {