mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-07 02:20:24 +08:00
IP库改为手动初始化
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
|||||||
"github.com/TeaOSLab/EdgeAPI/internal/rpc"
|
"github.com/TeaOSLab/EdgeAPI/internal/rpc"
|
||||||
"github.com/TeaOSLab/EdgeAPI/internal/setup"
|
"github.com/TeaOSLab/EdgeAPI/internal/setup"
|
||||||
"github.com/TeaOSLab/EdgeAPI/internal/utils"
|
"github.com/TeaOSLab/EdgeAPI/internal/utils"
|
||||||
|
"github.com/TeaOSLab/EdgeCommon/pkg/iplibrary"
|
||||||
"github.com/go-sql-driver/mysql"
|
"github.com/go-sql-driver/mysql"
|
||||||
"github.com/iwind/TeaGo/Tea"
|
"github.com/iwind/TeaGo/Tea"
|
||||||
"github.com/iwind/TeaGo/dbs"
|
"github.com/iwind/TeaGo/dbs"
|
||||||
@@ -86,6 +87,13 @@ func (this *APINode) Start() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 启动IP库
|
||||||
|
remotelogs.Println("API_NODE", "initializing ip library ...")
|
||||||
|
err = iplibrary.Init()
|
||||||
|
if err != nil {
|
||||||
|
remotelogs.Error("API_NODE", "initialize ip library failed: "+err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
// 检查数据库连接
|
// 检查数据库连接
|
||||||
err = this.checkDB()
|
err = this.checkDB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user