You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Redis#connect() will be resolved when status is ready (#648)
BREAKING CHANGE:
`Redis#connect()` will be resolved when status is ready
instead of `connect`:
```
const redis = new Redis({ lazyConnect: true })
redis.connect().then(() => {
assert(redis.status === 'ready')
})
```
This method will be invoked automatically when creating a new Redis instance.
84
+
This method will be invoked automatically when creating a new Redis instance
85
+
unless `lazyConnect: true` is passed.
86
+
87
+
When calling this method manually, a Promise is returned, which will
88
+
be resolved when the connection status is ready.
86
89
87
90
**Kind**: instance method of [<code>Redis</code>](#Redis)
88
91
**Access**: public
@@ -234,6 +237,7 @@ Creates a Redis Cluster instance
234
237
|[options.retryDelayOnClusterDown]| <code>number</code> | <code>100</code> | When a CLUSTERDOWN error is received, client will retry if `retryDelayOnClusterDown` is valid delay time. |
235
238
|[options.retryDelayOnTryAgain]| <code>number</code> | <code>100</code> | When a TRYAGAIN error is received, client will retry if `retryDelayOnTryAgain` is valid delay time. |
236
239
|[options.slotsRefreshTimeout]| <code>number</code> | <code>1000</code> | The milliseconds before a timeout occurs while refreshing slots from the cluster. |
240
+
|[options.slotsRefreshInterval]| <code>number</code> | <code>5000</code> | The milliseconds between every automatic slots refresh. |
237
241
|[options.redisOptions]| <code>Object</code> || Passed to the constructor of `Redis`. |
0 commit comments