-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
Hey,
We updated Hutch from 0.21 to 0.22.1, and we now have the following issue:
> Hutch::Config.get(:mq_host)
# => xyz.rmq.cloudamqp.com
> Hutch.connected?
# => nil
> Hutch.connect
#2016-10-10T22:14:44Z 3 INFO -- connecting to rabbitmq (amqp://[email protected]:5672/)
# [...] Could not establish TCP connection to 127.0.0.1:5672 [...]
> Hutch::Config.get(:mq_host)
# => "127.0.0.1"Notice how the Hutch::Config value is correct the first time, then after calling .connect, it's different, and is back to the default value?
Looking at the code...
def self.connect(options = {}, config = Hutch::Config)
return if connected?
@broker = Hutch::Broker.new(config)
@broker.connect(options)
end... it should be using the Hutch::Config class as default, and I checked the value of the mq_host attribute just before.
Interestingly, after all this mess, if I reset the values in the config class, with Hutch::Config.set..., and then call Hutch.connect, it works. Could this be a thread/fork issue? We're on heroku, just fyi.
Any idea about what's going on? Thanks.
Metadata
Metadata
Assignees
Labels
No labels