flag 처리

This commit is contained in:
2023-06-21 10:03:22 +09:00
parent 75c65f2f75
commit ed905a3722
6 changed files with 74 additions and 41 deletions

View File

@ -17,9 +17,9 @@ import (
"sync"
"time"
common "repositories.action2quare.com/ayo/gocommon"
"repositories.action2quare.com/ayo/gocommon/logger"
"repositories.action2quare.com/ayo/gocommon/wshandler"
"repositories.action2quare.com/ayo/tavern/core/flag"
"repositories.action2quare.com/ayo/tavern/core/rpc"
"github.com/go-redis/redis/v8"
@ -953,7 +953,7 @@ func (cfg *groupConfig) prepareInMemory(ctx context.Context, region string, type
toHashHex := func(name string) string {
hash := md5.New()
hash.Write([]byte(name))
if *common.Devflag {
if *flag.Devflag {
hn, _ := os.Hostname()
hash.Write([]byte(hn))
}
@ -1170,7 +1170,7 @@ func (cfg *groupConfig) prepareInMemory(ctx context.Context, region string, type
call := func() {
method, ok := reflect.TypeOf(gm).MethodByName(fn)
if !ok {
logger.Println("%s message decode failed :", targetbt, msg.Payload, err)
logger.Printf("%s message decode failed :", targetbt, msg.Payload, err)
}
args := []reflect.Value{