mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 02:15:22 +00:00
fix 2705 & 2706
This commit is contained in:
parent
64e14cde5e
commit
6e6bcdc737
@ -591,3 +591,6 @@ class OverloadClient(APIClient):
|
||||
|
||||
def lock_target(self, target, duration, trace=False):
|
||||
return
|
||||
|
||||
def unlock_target(self, *args, **kwargs):
|
||||
return
|
@ -137,6 +137,7 @@ class MonitoringCollector(object):
|
||||
data = copy.deepcopy(self.__collected_data)
|
||||
self.__collected_data = []
|
||||
for listener in self.listeners:
|
||||
# 2nd deep copy to ensure each listener gets it's own copy
|
||||
listener.monitoring_data(copy.deepcopy(data))
|
||||
|
||||
def hash_hostname(self, host):
|
||||
@ -145,6 +146,14 @@ class MonitoringCollector(object):
|
||||
else:
|
||||
return host
|
||||
|
||||
def not_empty(self):
|
||||
return len(self.__collected_data) > 0
|
||||
|
||||
def send_rest_data(self):
|
||||
while self.not_empty():
|
||||
logger.info("Sending monitoring data rests...")
|
||||
self.send_collected_data()
|
||||
|
||||
|
||||
class StdOutPrintMon(MonitoringDataListener):
|
||||
"""Simple listener, writing data to stdout"""
|
||||
|
@ -230,9 +230,7 @@ class Plugin(AbstractPlugin):
|
||||
for log in self.monitoring.artifact_files:
|
||||
self.core.add_artifact_file(log)
|
||||
|
||||
while self.monitoring.__collected_data:
|
||||
logger.info("Sending monitoring data rests...")
|
||||
self.monitoring.send_collected_data()
|
||||
self.monitoring.send_rest_data()
|
||||
if self.mon_saver:
|
||||
self.mon_saver.close()
|
||||
return retcode
|
||||
|
Loading…
Reference in New Issue
Block a user