mirror of
https://github.com/tubearchivist/tubearchivist-metrics.git
synced 2024-12-22 09:50:15 +00:00
Merge pull request #3 from tubearchivist/testing
Merging printf fixes from testing into master
This commit is contained in:
commit
6f9ca5391b
@ -56,4 +56,5 @@ class ElasticWrapper:
|
|||||||
print("Sleeping for 10 seconds...")
|
print("Sleeping for 10 seconds...")
|
||||||
sleep(10)
|
sleep(10)
|
||||||
else:
|
else:
|
||||||
|
es.close()
|
||||||
return response
|
return response
|
||||||
|
@ -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