mirror of
https://github.com/tubearchivist/tubearchivist-metrics.git
synced 2024-12-22 01:40:14 +00:00
re-formatting prints to utilise printf
This commit is contained in:
parent
5d5b4b4826
commit
af9d892857
@ -7,5 +7,5 @@ class GetMetrics:
|
|||||||
|
|
||||||
"""Get count of documents from ES"""
|
"""Get count of documents from ES"""
|
||||||
result = ElasticWrapper.get_count(index_name)
|
result = ElasticWrapper.get_count(index_name)
|
||||||
print("Metric for " + index_name + ": " + str(result))
|
print(f"Metric for {index_name}: {result}")
|
||||||
return int(result)
|
return int(result)
|
||||||
|
@ -9,9 +9,9 @@ config = AppConfig().config
|
|||||||
# Print configuration on console when starting the application
|
# Print configuration on console when starting the application
|
||||||
|
|
||||||
print("Configuration is currently set to:")
|
print("Configuration is currently set to:")
|
||||||
print("Elasticsearch URL: " + config["es_url"])
|
print(f'Elasticsearch URL: {config["es_url"]}')
|
||||||
print("Listen Port: " + config["listen_port"])
|
print(f'Listen Port: {config["listen_port"]}')
|
||||||
print("Poll Interval (seconds): " + config["poll_interval"])
|
print(f'Polling interval (seconds): {config["poll_interval"]}')
|
||||||
|
|
||||||
|
|
||||||
class AppMetrics:
|
class AppMetrics:
|
||||||
|
Loading…
Reference in New Issue
Block a user