Merge pull request #3 from tubearchivist/testing

Merging printf fixes from testing into master
This commit is contained in:
Ainsey11 2022-05-03 02:29:20 +01:00 committed by GitHub
commit 6f9ca5391b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -56,4 +56,5 @@ class ElasticWrapper:
print("Sleeping for 10 seconds...")
sleep(10)
else:
es.close()
return response

View File

@ -7,5 +7,5 @@ class GetMetrics:
"""Get count of documents from ES"""
result = ElasticWrapper.get_count(index_name)
print("Metric for " + index_name + ": " + str(result))
print(f"Metric for {index_name}: {result}")
return int(result)

View File

@ -9,9 +9,9 @@ config = AppConfig().config
# Print configuration on console when starting the application
print("Configuration is currently set to:")
print("Elasticsearch URL: " + config["es_url"])
print("Listen Port: " + config["listen_port"])
print("Poll Interval (seconds): " + config["poll_interval"])
print(f'Elasticsearch URL: {config["es_url"]}')
print(f'Listen Port: {config["listen_port"]}')
print(f'Polling interval (seconds): {config["poll_interval"]}')
class AppMetrics: