This commit is contained in:
azw 2023-08-20 18:11:24 +08:00
parent d9013f408e
commit 7dd2331f6c
3 changed files with 4 additions and 3 deletions

2
app.go
View File

@ -78,9 +78,9 @@ func (this *app) init(userApp UserApp) {
var tmpNodeId, tmpInstanceId int
flag.IntVar(&tmpNodeId, "n", 0, "node id")
flag.IntVar(&tmpInstanceId, "i", 0, "instance id")
flag.Parse()
this.nodeId = int32(tmpNodeId)
this.instanceId = int32(tmpInstanceId)
flag.Parse()
}
this.uuid.SetMachineId((this.nodeId - 1) * MAX_NODE_ID + this.instanceId)
this.loopCond = sync.NewCond(new(sync.Mutex))

View File

@ -1,8 +1,8 @@
package f5
const (
IM_HTTP_CLI_MGR_RESPONSE = 1
IM_EXEC_MAIN_THREAD_CB = iota
IM_HTTP_CLI_MGR_RESPONSE = iota + 1
IM_EXEC_MAIN_THREAD_CB
)
const (

View File

@ -31,6 +31,7 @@ type dbPool struct {
func (this *dbPool) init(style DBStyle) {
this.style = style
this.dataSourceHash = make(map[string]*q5.ListHead)
}
func (this *dbPool) unInit() {