-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support departure when using it in environments together with apartment and octopus #37
Comments
Hi @w32-blaster! welcome to Departure! I'm not familiar with Apartment myself but sounds like something reasonable to be implemented by providing a strategy config key to Departure as in https://github.com/departurerb/departure#with-global-configuration. Feel free to open a PR. |
@w32-blaster is there an associated code sample that you have handy to demonstrate this? Does the issue only occur if both apartment and octopus are used, or can it be reproduced only using apartment? |
@jamesmacwilliam and @w32-blaster - I can confirm that with just Octopus ( Failure: RAILS_ENV=production
|
Hey @w32-blaster, where did you end up with this? I assume that you're using As far as I can tell, the issue is that Apartment, when configured with I was able to work around it by setting |
Apartment gem is used for handling multi tenancy on database level. This means, having multiple databases which should have the same schema.
Octopus can be used to take care of master / slave mysql structure and route the queires to the right node (shard)
When using departure in an environment together with apartment and octopus, we are getting the following error:
Doing some investigation, it looks like we are always trying to connect to the same database (the main database which is set in the config file) and not to the one, which was selected by apartment
The text was updated successfully, but these errors were encountered: