Skip to content
Closed
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
4 changes: 3 additions & 1 deletion doc/config_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Methods

:param path: Dynamic configuration file path. Cluster policies will be read from the yaml file at cluster initialization and whenever the file changes. The policies fields in the file override all command policies.
:type path: str
:param interval: Check dynamic configuration file for changes after this number of cluster tend iterations. Defaults to ``60``.

:param interval: Interval in milliseconds between dynamic configuration check for file modifications.
The value must be greater than or equal to the tend interval. Defaults to ``60000``.
:type interval: int, optional

.. py:attribute:: path
Expand Down
2 changes: 1 addition & 1 deletion test/dyn_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dynamic:
send_key: false
static:
client:
config_interval: 1
config_interval: 1000
8 changes: 4 additions & 4 deletions test/new_tests/test_dynamic_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
class TestDynamicConfig:
def test_config_provider_defaults(self):
provider = aerospike.ConfigProvider(path="path")
assert provider.interval == 60
assert provider.interval == 60000

def test_config_provider_class(self):
provider = aerospike.ConfigProvider(path="path", interval=30)
provider = aerospike.ConfigProvider(path="path", interval=30000)

assert provider.path == "path"
assert provider.interval == 30
assert provider.interval == 30000
# Fields should be read only
with pytest.raises(AttributeError):
provider.path = "invalid"
with pytest.raises(AttributeError):
provider.interval = 10
provider.interval = 10000

def test_config_provider_class_invalid_args(self):
# See comment in test_mrt_api.py's test_transaction_class test case
Expand Down
Loading