Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acouchbase_columnar/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self,
loop: Optional[AbstractEventLoop] = None,
**kwargs: object) -> None:
from acouchbase_columnar.protocol.cluster import AsyncCluster as _AsyncCluster
self._impl = _AsyncCluster(connstr, credential, options, **kwargs)
self._impl = _AsyncCluster(connstr, credential, options, loop, **kwargs)

def database(self, name: str) -> AsyncDatabase:
"""Creates a database instance.
Expand Down
16 changes: 13 additions & 3 deletions acouchbase_columnar/protocol/core/client_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,26 @@ def connect(self, req: ConnectRequest) -> None:
raise ErrorMapper.build_exception(ret)
self._client.connection = ret

def close_connection(self, req: CloseConnectionRequest) -> bool:
"""
**INTERNAL**
"""
return self._client.close_connection(req)

def reset_client(self) -> None:
"""
**INTERNAL**
"""
if hasattr(self, '_client'):
del self._client

def _get_loop(self, loop: Optional[AbstractEventLoop] = None) -> AbstractEventLoop:
"""
**INTERNAL**
"""
if loop is None:
loop = get_event_loop()

if not loop.is_running():
raise RuntimeError("Event loop is not running.")

return loop


Expand Down
2 changes: 1 addition & 1 deletion deps/couchbase-cxx-client