mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 05:12:32 +08:00
发布v2.15.1版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -13,12 +13,12 @@ import (
|
||||
"hotgo/internal/library/hgrds/lock"
|
||||
"hotgo/internal/library/hgrds/pubsub"
|
||||
"hotgo/internal/service"
|
||||
"hotgo/utility/simple"
|
||||
)
|
||||
|
||||
// SubscribeClusterSync 订阅集群同步,可以用来集中同步数据、状态等
|
||||
func SubscribeClusterSync(ctx context.Context) {
|
||||
isCluster := g.Cfg().MustGet(ctx, "hotgo.isCluster").Bool()
|
||||
if !isCluster {
|
||||
if !simple.IsCluster(ctx) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -35,8 +35,7 @@ func SubscribeClusterSync(ctx context.Context) {
|
||||
|
||||
// PublishClusterSync 推送集群同步消息,如果没有开启集群部署,则不进行推送
|
||||
func PublishClusterSync(ctx context.Context, channel string, message interface{}) {
|
||||
isCluster := g.Cfg().MustGet(ctx, "hotgo.isCluster").Bool()
|
||||
if !isCluster {
|
||||
if !simple.IsCluster(ctx) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@@ -154,7 +154,7 @@ func InitTrace(ctx context.Context) {
|
||||
|
||||
// SetGFMode 设置gf运行模式
|
||||
func SetGFMode(ctx context.Context) {
|
||||
mode := g.Cfg().MustGet(ctx, "hotgo.mode").String()
|
||||
mode := g.Cfg().MustGet(ctx, "system.mode").String()
|
||||
if len(mode) == 0 {
|
||||
mode = gmode.NOT_SET
|
||||
}
|
||||
|
Reference in New Issue
Block a user