Conversation
Why not include a port in the REDIS_URL? |
@technicalpickles I think the wish is to be able to manipulate the port without having to know the URL. |
Do you know the HOSTNAME? The URL would just be redis://HOSTNAME:PORT |
@parkr @technicalpickles |
@sableloki I'm still not sure I follow why including the port number in the REDIS_URL doesn't work. You can see
Could you elaborate on 'conked out'? Were there any particular errors or log messages? |
it would attempt to connect to the default port and then append |
I mispoke earlier, the environment variables it recognizes are:
Could you make sure one of those is set with the port in the url, ie redis://somehost:12670? It's also worth noting that this would break redis-brain for people who expect that behavior to work, of being able to include the port in the URL. |
i had REDISCLOUD_URL set to exactly that |
If that's the case, seems like a bug in the implementation. I think I rather see that fixed than adding another environment variable. In general, I find it preferable to have |
thats a fair argument i however prefer to have more verbose config as it makes debugging that much easier as you can drill right down the point. |
If we need debugging, should just add |
@@ -18,7 +19,7 @@ Redis = require "redis" | |||
|
|||
module.exports = (robot) -> | |||
info = Url.parse process.env.REDISTOGO_URL or process.env.REDISCLOUD_URL or process.env.BOXEN_REDIS_URL or 'redis://localhost:6379' | |||
client = Redis.createClient(info.port, info.hostname) | |||
client = Redis.createClient(process.ENV.REDIS_PORT, info.hostname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process.ENV
is not valid. process.env
is what you're looking for.
I agree with @technicalpickles on this. The port can be set via one of the URL env vars that already exists. Adding another env var would add undue complexity. I vote this issue be closed. |
No description provided.