Skip to content

Implement getting the cluster nodes list from nodes #135

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

Merged
merged 1 commit into from
Jun 10, 2019
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
8 changes: 8 additions & 0 deletions doc/api/class-mesh-connection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

.. currentmodule:: tarantool.mesh_connection

class :class:`MeshConnection`
-----------------------------

.. autoclass:: MeshConnection

1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ API Reference

api/module-tarantool.rst
api/class-connection.rst
api/class-mesh-connection.rst
api/class-space.rst
api/class-response.rst

Expand Down
1 change: 1 addition & 0 deletions doc/index.ru.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

api/module-tarantool.rst
api/class-connection.rst
api/class-mesh-connection.rst
api/class-space.rst
api/class-response.rst

Expand Down
2 changes: 2 additions & 0 deletions tarantool/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@
RECONNECT_MAX_ATTEMPTS = 10
# Default delay between attempts to reconnect (seconds)
RECONNECT_DELAY = 0.1
# Default cluster nodes list refresh interval (seconds)
CLUSTER_DISCOVERY_DELAY = 60
12 changes: 12 additions & 0 deletions tarantool/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class InterfaceError(Error):
'''


class ConfigurationError(Error):
'''
Error of initialization with a user-provided configuration.
'''


# Monkey patch os.strerror for win32
if sys.platform == "win32":
# Windows Sockets Error Codes (not all, but related on network errors)
Expand Down Expand Up @@ -152,6 +158,11 @@ class NetworkWarning(UserWarning):
pass


class ClusterDiscoveryWarning(UserWarning):
'''Warning related to cluster discovery'''
pass


# always print this warnings
warnings.filterwarnings("always", category=NetworkWarning)

Expand All @@ -166,6 +177,7 @@ def warn(message, warning_class):
line_no = frame.f_lineno
warnings.warn_explicit(message, warning_class, module_name, line_no)


_strerror = {
0: ("ER_UNKNOWN", "Unknown error"),
1: ("ER_ILLEGAL_PARAMS", "Illegal parameters, %s"),
Expand Down
Loading