Commit aae5f918 by Gregory Nagy

client.py: the client will not send metrics report if no metric is collected in that beat

parent bd5fb513
...@@ -208,8 +208,9 @@ class Client: ...@@ -208,8 +208,9 @@ class Client:
metrics = nodeMetrics + vmMetrics metrics = nodeMetrics + vmMetrics
if self.debugMode == "True": if self.debugMode == "True":
print(metrics) print(metrics)
if self.__send(metrics) is False: if len(metrics) is not 0:
raise RuntimeError if self.__send(metrics) is False:
raise RuntimeError
time.sleep(1) time.sleep(1)
self.beat = self.beat + 1 self.beat = self.beat + 1
if ((self.beat % (maxFrequency + 1)) is 0): if ((self.beat % (maxFrequency + 1)) is 0):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment