From 2d6875c93b25d0b7336c7fa11e066d213259fe2e Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 25 四月 2024 10:02:01 +0800 Subject: [PATCH] 更改定时任务时区设置 --- main.go | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 8393009..c79c874 100644 --- a/main.go +++ b/main.go @@ -14,6 +14,7 @@ "fmt" "log" "net/http" + _ "net/http/pprof" "time" ) @@ -37,12 +38,14 @@ var syncTables = []string{ "procedures", "process_model", - "production_progress", "work_order", "task_status_sync", "device", "device_plc", "system_status", + "process_model_plc_address", + "reports_to_cloud", + "report_work", } agent := serf.InitAgent("apsClient", syncTables, sqlitex.GetDB()) @@ -55,12 +58,16 @@ } //浠庢枃浠堕噷璇诲彇褰撳墠鐢熶骇璁惧id鑾峰彇璁惧鍒楄〃绗竴涓� - err := service.InitCurrentDeviceID() + err := service.InitCurrentDeviceID(serf.Vasystem.ServerID) if err != nil { logx.Errorf("InitCurrentDeviceID error: %v, exit", err) return } + go func() { + service.ReportsSystemDeviceToCloud(serf.Vasystem.ServerID) + }() + // 鍒ゆ柇褰撳墠闆嗙兢鐘舵�� logx.Infof("current agent.ClusterStatus:%v", agent.ClusterStatus) log.Println("current agent.ClusterStatus:", agent.ClusterStatus) -- Gitblit v1.8.0