remove unnecessary data report excluding me

This commit is contained in:
BennyThink 2022-03-02 20:01:52 +08:00
parent f1e4932b17
commit e35fc53807
No known key found for this signature in database
GPG Key ID: 6CD0DBDA5235D481

View File

@ -298,6 +298,9 @@ class InfluxDB:
self.client.write_points(json_body)
def collect_data(self):
if os.getenv("INFLUX_HOST") is None:
return
with contextlib.suppress(Exception):
self.data = self.get_worker_data()
self.__fill_worker_data()