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

Fallback to ActiveRecord connection if no ENV variables exist #98

Closed
wants to merge 1 commit into from

Conversation

neilmiddleton
Copy link

As discussed in #96 - this pull request will fallback to ActiveRecord should it exist and use the connection defined there.

@ryandotsmith
Copy link
Contributor

@neilmiddleton what do you think of #97? I think I prefer #97 as it is a bit more abstract. For instance, if I am using sinatra + sequel and I want to share the same database connection between sequel and queue_classic, I can pass the connection to queue_classic.

@neilmiddleton
Copy link
Author

I'm wondering if a hybrid of both approaches might work best. For instance, most people will be using one of two or three ORMs so falling back to those silently might work well - but there'll also be instances where passing the connection in would be good.

On 23 Aug 2012, at 17:09, ♠ ace hacker [email protected] wrote:

@neilmiddleton what do you think of #97? I think I prefer #97 as it is a bit more abstract. For instance, if I am using sinatra + sequel and I want to share the same database connection between sequel and queue_classic, I can pass the connection to queue_classic.


Reply to this email directly or view it on GitHub.

@neilmiddleton
Copy link
Author

Given that #97 is merged, is this still relevant @ryandotsmith?

@ryandotsmith
Copy link
Contributor

I think #97 is the future. Having QC provide a method to override the connection seems like the path of least resistance. Thanks for the PR anyways... I appreciate your thought and time.

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.

2 participants