From 8f3e9a63e3855e29c1c5058c1295fcc626ac9013 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 12 九月 2023 14:11:55 +0800 Subject: [PATCH] fix --- main.go | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/main.go b/main.go index 54c673f..386843c 100644 --- a/main.go +++ b/main.go @@ -2,10 +2,13 @@ import ( "apsClient/conf" + "apsClient/crontask" "apsClient/model" "apsClient/nsq" "apsClient/pkg/logx" "apsClient/router" + "apsClient/service" + "apsClient/service/plc_address" "fmt" "net/http" "os" @@ -29,6 +32,16 @@ return } + if err := crontask.InitTask(); err != nil { + logx.Errorf("crontab task Init err:%v", err) + return + } + //鍔犺浇plc鍐欏叆鍦板潃 + plc_address.LoadAddressFromFile() + + //鎻愬墠鍔犺浇浠诲姟 + service.NewTaskService().GetTask() + go shutdown() logx.Infof("apsClient start serve...") server := &http.Server{ -- Gitblit v1.8.0