chore: use NODE_TYPE to determine node type

This commit is contained in:
JustSong
2023-06-22 20:39:17 +08:00
parent 7497f24daa
commit b090e50f72
4 changed files with 13 additions and 10 deletions

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")