Skip to content

CLQEngine multiple sessions/keyspaces support#656

Merged
aboudreault merged 18 commits into
masterfrom
613
Aug 31, 2016
Merged

CLQEngine multiple sessions/keyspaces support#656
aboudreault merged 18 commits into
masterfrom
613

Conversation

@aboudreault

@aboudreault aboudreault commented Aug 26, 2016

Copy link
Copy Markdown
Contributor

No description provided.


using = UsingDescriptor()

_get_connection = BaseModel._get_connection

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has to be verified... not sure it's safe

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still looking into this? Seems like it should work...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright. I wasn't sure if the hybrid_method could be binded to the other class or something.


Host = namedtuple('Host', ['name', 'port'])

cluster = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the object oriented approach, but wondering if we should set these module attributes when the default connection is made, so we don't lose attributes that were not explicitly "private".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest do it for 3.x, but remove in 4.0. So cluster will always point to the DEFAULT cluster object.

@aboudreault aboudreault changed the title (WIP) CLQEngine multiple sessions/keyspaces support CLQEngine multiple sessions/keyspaces support Aug 31, 2016
@aboudreault

Copy link
Copy Markdown
Contributor Author

Addressed comments and added tests

Comment thread cassandra/cqlengine/connection.py Outdated
"""Format log message to add keyspace and connection context"""
connection_info = connection if connection else DEFAULT_CONNECTION
connection_info = connection
if not connection_info:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be simplified to connection_info = connection or 'DEFAULT_CONNECTION'?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yeah. totally.

@aholmberg

Copy link
Copy Markdown
Contributor

+1

@aboudreault aboudreault merged commit 87dd9df into master Aug 31, 2016
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