mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-09 23:53:41 +08:00
feat: 开启redis的情况下设置SYNC_FREQUENCY默认为60
This commit is contained in:
@@ -18,9 +18,8 @@ func InitRedisClient() (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if os.Getenv("SYNC_FREQUENCY") == "" {
|
if os.Getenv("SYNC_FREQUENCY") == "" {
|
||||||
RedisEnabled = false
|
SysLog("SYNC_FREQUENCY not set, use default value 60")
|
||||||
SysLog("SYNC_FREQUENCY not set, Redis is disabled")
|
SyncFrequency = 60
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
SysLog("Redis is enabled")
|
SysLog("Redis is enabled")
|
||||||
opt, err := redis.ParseURL(os.Getenv("REDIS_CONN_STRING"))
|
opt, err := redis.ParseURL(os.Getenv("REDIS_CONN_STRING"))
|
||||||
|
|||||||
Reference in New Issue
Block a user