From ef7d02ce56e98e8cbc5ed6ec746ea39bf0b8c9e2 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 16 九月 2023 22:44:58 +0800
Subject: [PATCH] 增加实时获取生产进度接口

---
 main.go |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/main.go b/main.go
index fbf0511..f9585bf 100644
--- a/main.go
+++ b/main.go
@@ -2,9 +2,12 @@
 
 import (
 	"apsClient/conf"
+	"apsClient/crontask"
 	"apsClient/model"
+	"apsClient/nsq"
 	"apsClient/pkg/logx"
 	"apsClient/router"
+	"apsClient/service/plc_address"
 	"fmt"
 	"net/http"
 	"os"
@@ -23,6 +26,21 @@
 		return
 	}
 
+	if err := nsq.Init(); err != nil {
+		logx.Errorf("nsq Init err:%v", err)
+		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