mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 21:22:16 +08:00
update
This commit is contained in:
parent
03cf860204
commit
dbe44b64dc
@ -13,6 +13,6 @@ serviceBinaries:
|
|||||||
openim-rpc-third: 1
|
openim-rpc-third: 1
|
||||||
toolBinaries:
|
toolBinaries:
|
||||||
- check-free-memory
|
- check-free-memory
|
||||||
# - check-component
|
- check-component
|
||||||
- seq
|
- seq
|
||||||
maxFileDescriptors: 10000
|
maxFileDescriptors: 10000
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import (
|
|||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/database/mgo"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/database/mgo"
|
||||||
"github.com/openimsdk/tools/db/mongoutil"
|
"github.com/openimsdk/tools/db/mongoutil"
|
||||||
"github.com/openimsdk/tools/db/redisutil"
|
"github.com/openimsdk/tools/db/redisutil"
|
||||||
|
"github.com/openimsdk/tools/utils/runtimeenv"
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
@ -42,9 +43,10 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func readConfig[T any](dir string, name string) (*T, error) {
|
func readConfig[T any](dir string, name string) (*T, error) {
|
||||||
if os.Getenv(config.DeploymentType) == config.KUBERNETES {
|
if runtimeenv.PrintRuntimeEnvironment() == config.KUBERNETES {
|
||||||
dir = os.Getenv(config.MountConfigFilePath)
|
dir = os.Getenv(config.MountConfigFilePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
data, err := os.ReadFile(filepath.Join(dir, name))
|
data, err := os.ReadFile(filepath.Join(dir, name))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user