The use case is to configure the redis connections different for each environment using Grails 2.1 . Enhancing the default grails Config.groovy I used the following configuration:
environments {
development {
grails.logging.jul.usebridge = true
redis {
poolConfig {
maxActive=128
minIdle=4
}
port = 6379
host = "localhost"
connections {
objectsCache {
port = 6378
host = "localhost"
}
streamsCache {
port = 6378
host = "localhost"
}
pubsub {
port = 6379
host = "localhost"
}
}
}
}
production {
grails.logging.jul.usebridge = false
redis {
poolConfig {
maxActive=16
minIdle=4
}
connections {
objectsCache {
port = 6379
host = "server1"
}
streamsCache {
port = 6379
host = "server2"
}
pubsub {
port = 6379
host = "server3"
}
}
}
}
}
The problem is that enviroments in Grails 2.1 is not under grails{ } , so in RedisGrailsPlugin:
line 59 : def redisConfigMap = application.config.grails.redis ?: [:]
the redisConfigMap is always empty. I overcame the problem changing this line to:
- def redisConfigMap = application.config.redis ?: [:]
Thank you for the great job,
Tassos
The use case is to configure the redis connections different for each environment using Grails 2.1 . Enhancing the default grails Config.groovy I used the following configuration:
environments {
development {
grails.logging.jul.usebridge = true
redis {
poolConfig {
maxActive=128
minIdle=4
}
port = 6379
host = "localhost"
connections {
objectsCache {
port = 6378
host = "localhost"
}
streamsCache {
port = 6378
host = "localhost"
}
pubsub {
port = 6379
host = "localhost"
}
}
The problem is that enviroments in Grails 2.1 is not under grails{ } , so in RedisGrailsPlugin:
line 59 : def redisConfigMap = application.config.grails.redis ?: [:]
the redisConfigMap is always empty. I overcame the problem changing this line to:
Thank you for the great job,
Tassos