上传代码
This commit is contained in:
parent
0e1f31c0b9
commit
126ff41523
2
.gitignore
vendored
2
.gitignore
vendored
@ -15,5 +15,7 @@ bin/conf
|
||||
.vscode
|
||||
./bin/conf
|
||||
./bin/log
|
||||
./bin/gateway
|
||||
./bin/worker
|
||||
~$*.xlsx
|
||||
cmd/luban/
|
6
linux-build.bat
Normal file
6
linux-build.bat
Normal file
@ -0,0 +1,6 @@
|
||||
set GOOS=linux
|
||||
set CGO_ENABLED=0
|
||||
del bin/gateway,bin/worker
|
||||
go build -o bin/gateway services/gateway/main.go
|
||||
go build -o bin/worker services/worker/main.go
|
||||
REM pause
|
@ -24,5 +24,6 @@ func (this *User_Comp) Login(ctx context.Context, session comm.IUserSession, rsp
|
||||
session.SendMsg("LogigResp", &pb.UserLoginResp{
|
||||
Code: 200,
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -2,9 +2,7 @@ package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/sys/cache"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/sys/db"
|
||||
|
||||
"github.com/liwei1dao/lego/base/rpcx"
|
||||
"github.com/liwei1dao/lego/sys/log"
|
||||
@ -16,16 +14,6 @@ type ServiceBase struct {
|
||||
|
||||
func (this *ServiceBase) InitSys() {
|
||||
this.RPCXService.InitSys()
|
||||
if err := cache.OnInit(this.GetSettings().Sys["cache"]); err != nil {
|
||||
panic(fmt.Sprintf("init sys.cache err: %s", err.Error()))
|
||||
} else {
|
||||
log.Infof("init sys.cache success!")
|
||||
}
|
||||
if err := db.OnInit(this.GetSettings().Sys["db"]); err != nil {
|
||||
panic(fmt.Sprintf("init sys.db err: %s", err.Error()))
|
||||
} else {
|
||||
log.Infof("init sys.db success!")
|
||||
}
|
||||
if err := configure.OnInit(this.GetSettings().Sys["configure"]); err != nil {
|
||||
panic(fmt.Sprintf("init sys.configure err: %s", err.Error()))
|
||||
} else {
|
||||
|
@ -2,12 +2,16 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"go_dreamfactory/modules/web"
|
||||
"go_dreamfactory/services"
|
||||
"go_dreamfactory/sys/cache"
|
||||
"go_dreamfactory/sys/db"
|
||||
|
||||
"github.com/liwei1dao/lego"
|
||||
"github.com/liwei1dao/lego/base/rpcx"
|
||||
"github.com/liwei1dao/lego/core"
|
||||
"github.com/liwei1dao/lego/sys/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -41,4 +45,14 @@ type Service struct {
|
||||
|
||||
func (this *Service) InitSys() {
|
||||
this.ServiceBase.InitSys()
|
||||
if err := cache.OnInit(this.GetSettings().Sys["cache"]); err != nil {
|
||||
panic(fmt.Sprintf("init sys.cache err: %s", err.Error()))
|
||||
} else {
|
||||
log.Infof("init sys.cache success!")
|
||||
}
|
||||
if err := db.OnInit(this.GetSettings().Sys["db"]); err != nil {
|
||||
panic(fmt.Sprintf("init sys.db err: %s", err.Error()))
|
||||
} else {
|
||||
log.Infof("init sys.db success!")
|
||||
}
|
||||
}
|
||||
|
@ -147,6 +147,6 @@ func (this *Configure) loaderConfigure(name string, handle *configurehandle) (er
|
||||
}
|
||||
this.clock.Lock()
|
||||
this.configure[name] = returnValues[0].Interface()
|
||||
this.clock.Lock()
|
||||
this.clock.Unlock()
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user