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
* @example Graceful maintenance with timeout smoothing
166
+
* ```
167
+
* const client = createClient({
168
+
* gracefulMaintenance: {
169
+
* handleFailedCommands: 'retry',
170
+
* handleTimeouts: 5000, // Extend timeouts to 5 seconds during maintenance
171
+
* }
172
+
* });
173
+
* ```
174
+
*/
175
+
gracefulMaintenance?: {
176
+
/**
177
+
* Designates how failed commands should be handled. A failed command is when the time isn’t sufficient to deal with the responses on the old connection before the server shuts it down
178
+
*/
179
+
handleFailedCommands: 'exception'|'retry',
180
+
/**
181
+
* Specify whether we should throw a MaintenanceTimeout exception or provide more relaxed timeout, in order to minimize command timeouts during maintenance.
182
+
*/
183
+
handleTimeouts: 'exception'|number,
184
+
}
147
185
}
148
186
149
187
typeWithCommands<
@@ -468,6 +506,10 @@ export default class RedisClient<
468
506
thrownewError('Client Side Caching is only supported with RESP3');
0 commit comments