diff --git a/proto/conf.go b/proto/conf.go index 02abce4..b2b41cb 100644 --- a/proto/conf.go +++ b/proto/conf.go @@ -1,7 +1,6 @@ package proto import ( - "VideoStream/worker" "encoding/json" "fmt" "os" @@ -80,7 +79,6 @@ func ReadConfig(path string) error { if err2 != nil { fmt.Println("ReadConfigToSetSystem Error encoding config,err :", err2) } - worker.SetRedis("vp_stream_config", string(jsonData)) SigningKey = []byte(Config.TOKEN_SECRET) if Config.TOKEN_SECRET == "" { err = fmt.Errorf("token secret is empty: %s", string(jsonData)) diff --git a/service/tool.go b/service/tool.go index ea93d66..01776cc 100644 --- a/service/tool.go +++ b/service/tool.go @@ -3,6 +3,7 @@ package service import ( "VideoStream/dao" "VideoStream/proto" + "VideoStream/worker" "fmt" "gocv.io/x/gocv" "image" @@ -146,3 +147,7 @@ func DoGetVideoStream() { func GetDevice(id, auth_id int) dao.Device { return dao.FindDeviceByID(id, auth_id) } + +func SetConfigRedis(key, config string) { + worker.SetRedis(key, config) +}