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

fix a few bugs #26

Merged
merged 2 commits into from
Sep 26, 2023
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
6 changes: 3 additions & 3 deletions locust_influxdb_listener/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def __init__(
:param verify_ssl: Verify SSL certificates (only if SSL is enabled).
:param additional_tags: Additional tags to include in globally for all data points.
"""
self.host = host if host else influx_host # Renamed from influx_host
self.port = port if port else influx_port # Renamed from influx_port
self.host = influx_host if influx_host else host # Renamed from influx_host
self.port = influx_port if influx_port else port # Renamed from influx_port
self.user = user
self.pwd = pwd
self.database = database
Expand Down Expand Up @@ -208,7 +208,7 @@ def __listen_for_locust_errors(self, node_id, user_instance, exception: Exceptio
"""

time = datetime.utcnow()
tags = {**{'exception_tag': repr(exception)}, **self.tags}
tags = {**{'exception_tag': repr(exception)}, **self.additional_tags}
fields = {
'node_id': node_id,
'user_instance': repr(user_instance),
Expand Down
4 changes: 2 additions & 2 deletions tests/test_initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def test_deprecated_attributes(self):
influx_port=8000,
)

self.assertEqual(influx_settings.host, 'localhost')
self.assertEqual(influx_settings.port, 8086)
self.assertEqual(influx_settings.host, 'this_host')
self.assertEqual(influx_settings.port, 8000)


if __name__ == '__main__':
Expand Down