MCPcopy Index your code
hub / github.com/simstudioai/sim / closeRedisConnection

Function closeRedisConnection

apps/sim/lib/core/config/redis.ts:286–301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284 * Use for graceful shutdown.
285 */
286export async function closeRedisConnection(): Promise<void> {
287 if (state.pingInterval) {
288 clearInterval(state.pingInterval)
289 state.pingInterval = null
290 }
291
292 if (state.client) {
293 try {
294 await state.client.quit()
295 } catch (error) {
296 logger.error('Error closing Redis connection', { error })
297 } finally {
298 state.client = null
299 }
300 }
301}
302
303/**
304 * Reset all module-level state. Only intended for use in tests.

Callers 1

redis.test.tsFile · 0.90

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected