Files
Verso/services/history-v1/storage/scripts/redis.mjs
T
Brian GoughandCopybot 32983da29c Merge pull request #23700 from overleaf/bg-history-redis
add redis to history-v1

GitOrigin-RevId: def900c4b560ea0a297b11b6c0ecc8cc8caa5b49
2025-02-21 09:04:06 +00:00

17 lines
400 B
JavaScript

import redis from '@overleaf/redis-wrapper'
import config from 'config'
const redisOptions = config.get('redis.queue')
console.log('REDIS CONFIG', redisOptions)
const rclient = redis.createClient(redisOptions)
try {
await rclient.healthCheck()
console.log('REDIS HEALTHCHECK SUCCEEDED')
} catch (error) {
console.error('REDIS HEALTHCHECK FAILED', error)
} finally {
await rclient.quit()
}