chore: use NODE_TYPE to determine node type

This commit is contained in:
JustSong
2023-06-22 20:39:17 +08:00
parent e975d41ce4
commit c90fc7e0d6
4 changed files with 13 additions and 10 deletions
+2 -2
View File
@@ -17,9 +17,9 @@ func InitRedisClient() (err error) {
SysLog("REDIS_CONN_STRING not set, Redis is not enabled")
return nil
}
if IsMasterNode {
SysLog("Redis is disabled on master node")
if os.Getenv("SYNC_FREQUENCY") == "" {
RedisEnabled = false
SysLog("SYNC_FREQUENCY not set, Redis is disabled")
return nil
}
SysLog("Redis is enabled")