上传代码
This commit is contained in:
parent
c48086f76d
commit
8515c26750
@ -26,7 +26,8 @@ type Options struct {
|
||||
ConsulServers []string //Consul集群服务地址
|
||||
RpcxStartType RpcxStartType //Rpcx启动类型
|
||||
AutoConnect bool //自动连接 客户端启动模式下 主动连接发现的节点服务器
|
||||
SerializeType protocol.SerializeType
|
||||
SerializeType protocol.SerializeType //序列化方式
|
||||
OutTime int32 //超时配置 单位秒 0 无超时限制
|
||||
Debug bool //日志是否开启
|
||||
Log log.ILogger
|
||||
}
|
||||
@ -89,6 +90,7 @@ func newOptions(config map[string]interface{}, opts ...Option) (options *Options
|
||||
options = &Options{
|
||||
AutoConnect: true,
|
||||
SerializeType: protocol.MsgPack,
|
||||
OutTime: 5,
|
||||
}
|
||||
if config != nil {
|
||||
mapstructure.Decode(config, options)
|
||||
@ -111,6 +113,7 @@ func newOptionsByOption(opts ...Option) (options *Options, err error) {
|
||||
options = &Options{
|
||||
AutoConnect: true,
|
||||
SerializeType: protocol.MsgPack,
|
||||
OutTime: 5,
|
||||
}
|
||||
for _, o := range opts {
|
||||
o(options)
|
||||
|
@ -24,6 +24,7 @@ func newSys(options *Options) (sys ISys, err error) {
|
||||
service, err = newService(options)
|
||||
client, err = newClient(options)
|
||||
sys = &RPCX{
|
||||
options: options,
|
||||
service: service,
|
||||
client: client,
|
||||
}
|
||||
@ -31,6 +32,7 @@ func newSys(options *Options) (sys ISys, err error) {
|
||||
}
|
||||
|
||||
type RPCX struct {
|
||||
options *Options
|
||||
service ISys
|
||||
client ISys
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ func (this *ModelWorldtask) taskFinishPush(session comm.IUserSession, userTask *
|
||||
this.moduleWorldtask.Debug("nextTaskIds", log.Field{Key: "nextTaskIds", Value: nextTaskIds})
|
||||
|
||||
nextTask := make(map[int32]*pb.Worldtasks)
|
||||
if len(nextTask) > 0 {
|
||||
if len(nextTaskIds) > 0 {
|
||||
for _, next := range nextTaskIds {
|
||||
ut := this.updateCurrentTaskCond(session.GetUserId(), u.Lv, userTask, curTaskConf.Key, next)
|
||||
if ut != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user