mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-23 19:51:35 +00:00
6cc2db3cdd
Upgrade Prettier to v3 GitOrigin-RevId: 6f1338f196408f3edb4892d5220ad3665ff1a5bc
19 lines
569 B
JavaScript
19 lines
569 B
JavaScript
const redis = require('@overleaf/redis-wrapper')
|
|
const logger = require('@overleaf/logger')
|
|
|
|
module.exports = {
|
|
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)
|
|
})
|
|
},
|
|
}
|