We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func startPubSubLoop() { cacheStore := storage.RedisCluster{} cacheStore.Connect() // On message, synchronize for { err := cacheStore.StartPubSubHandler(RedisPubSubChannel, func(v interface{}) { handleRedisEvent(v, nil, nil) }) if err != nil { if !errors.Is(err, storage.ErrRedisIsDown) { log.Errorf("Connection to Redis failed, reconnect in 10s: %s", err.Error()) } time.Sleep(10 * time.Second) log.Warnf("Reconnecting: %s", err.Error()) } } }
新手疑问:这个函数好像并没有设置一个停止循环的条件,是有意这么做的吗?
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
新手疑问:这个函数好像并没有设置一个停止循环的条件,是有意这么做的吗?
The text was updated successfully, but these errors were encountered: