This commit is contained in:
liwei1dao 2022-07-26 11:36:27 +08:00
commit c5b5cb452c
8 changed files with 11 additions and 26 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ pb/proto
~$*.xlsx ~$*.xlsx
*.pid *.pid
cmd/luban/ cmd/luban/
pb.bat

0
bin/build_linux.sh Executable file → Normal file
View File

0
bin/start.sh Executable file → Normal file
View File

0
bin/stop.sh Executable file → Normal file
View File

0
bin/stup.sh Executable file → Normal file
View File

View File

@ -33,6 +33,14 @@ var user_builders = []*TestCase{
rsp: &pb.UserAddResResp{}, rsp: &pb.UserAddResResp{},
// enabled: true, // enabled: true,
}, },
{
desc: "查看图鉴",
mainType: string(comm.ModuleUser),
subType: "gettujian",
req: &pb.UserGetTujianReq{},
rsp: &pb.UserGetTujianResp{},
enabled: true,
},
{ {
desc: "添加资源", desc: "添加资源",
mainType: string(comm.ModuleUser), mainType: string(comm.ModuleUser),

View File

@ -40,13 +40,11 @@ func (this *DB_Comp) Start() (err error) {
} }
func (this *DB_Comp) run() { func (this *DB_Comp) run() {
timer := time.NewTimer(time.Second * 2)
defer timer.Stop()
for { for {
select { select {
case v := <-this.task: case v := <-this.task:
this.Model_UpdateDBByLog(v) this.Model_UpdateDBByLog(v)
case <-timer.C: case <-time.After(time.Second * 2):
this.Model_UpdateDBByLog("") this.Model_UpdateDBByLog("")
} }
if !this.isInit && this.Model_TotalCount() <= 0 { if !this.isInit && this.Model_TotalCount() <= 0 {

22
pb.bat
View File

@ -1,22 +0,0 @@
@echo off
set PROJECT_ROOT=.\
set PROJECT_ROOT=.
set SRC=%PROJECT_ROOT%\pb\proto
set TAR=%PROJECT_ROOT%\pb
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\notify\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\user\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\friend\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\items\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\mail\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\equipment\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\hero\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\shop\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\mainline\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\task\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\chat\*.proto
pause