mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
[real-time] convert real time to esm GitOrigin-RevId: 7cc530cc977549d3274be42585735e1fd72cad5f
20 lines
557 B
JavaScript
20 lines
557 B
JavaScript
import redis from '@overleaf/redis-wrapper'
|
|
import logger from '@overleaf/logger'
|
|
|
|
export default {
|
|
createClientList(...configs) {
|
|
// create a dynamic list of redis clients, excluding any configurations which are not defined
|
|
return configs.filter(Boolean).map(x => {
|
|
const redisType = x.cluster
|
|
? 'cluster'
|
|
: x.sentinels
|
|
? 'sentinel'
|
|
: x.host
|
|
? 'single'
|
|
: 'unknown'
|
|
logger.debug({ redis: redisType }, 'creating redis client')
|
|
return redis.createClient(x)
|
|
})
|
|
},
|
|
}
|