Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not loading redis config values from Config.groovy #7

Closed
wants to merge 1 commit into from

Conversation

chrislovecnm
Copy link

The redisConfigMap is not loading values from the correct location. I have fixed this. The some of the unit tests are not passing, but I do not think that this change is creating the error in the unit tests. The unit test for the taglibs are failing.

This pull resolves #6

@tednaleid
Copy link
Contributor

@chrislovecnm thanks for the pull request!

I'm not understanding something though. The documentation on the wiki page says to use grails.redis.<values>. Your example and pull request removes grails from it.

I think this is a change that was suggested a while ago by Burt Beckwith as that's apparently the standard naming for plugin config files now, grails.pluginname.<values> instead of just pluginname.<values>.

Is there somewhere in the current documentation that's still suggesting using just redis.<values> as you have in your config file?

@chrislovecnm
Copy link
Author

In order to use environment specific config I use the conf file in the demo that I provided.

https://github.com/chrislovecnm/redis-test/blob/master/grails-app/conf/Config.groovy

How do you recommend I handle the config?

@tednaleid
Copy link
Contributor

Doesn't just nesting it inside a grails closure work? So changing your example to:

development {

    grails {
        redis {
            poolConfig {
                // jedis pool specific tweaks here, see jedis docs & src
                // ex: testWhileIdle = true
            }
            port = 6379
            host = "goldgriff"
            timeout = 2000 //default in milliseconds
            //password = "somepassword" //defaults to no password
        }
    }
    grails.logging.jul.usebridge = true
}
production {
    grails {
        redis {
            poolConfig {
                // jedis pool specific tweaks here, see jedis docs & src
                // ex: testWhileIdle = true
            }
            port = 6379
            host = "www"
            timeout = 2000 //default in milliseconds
            //password = "somepassword" //defaults to no password
        }
    }
    grails.logging.jul.usebridge = false
    // TODO: grails.serverURL = "https://www.changeme.com"
}

You're just missing the grails part of the config. You can see in the lines you below it that your logging statement has grails at the beginning (otherwise instead of grails.logging.jul.usebridge it would have just been logging.jul.usebridge) same thing here.

@chrislovecnm
Copy link
Author

Will try ... makes sense. ~ Slapping palm to forehead ~

@tednaleid tednaleid closed this Apr 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unable to set another hostname for production
2 participants