diff --git a/app/classes/models/management.py b/app/classes/models/management.py index 59ad3d6f..fa905d88 100644 --- a/app/classes/models/management.py +++ b/app/classes/models/management.py @@ -140,7 +140,8 @@ class helpers_management: #************************************************************************************************ @staticmethod def get_latest_hosts_stats(): - query = Host_Stats.select().order_by(Host_Stats).get() + #pylint: disable=no-member + query = Host_Stats.select().order_by(Host_Stats.id.desc()).get() return model_to_dict(query) #************************************************************************************************ diff --git a/app/classes/shared/tasks.py b/app/classes/shared/tasks.py index 905894d2..d448b644 100644 --- a/app/classes/shared/tasks.py +++ b/app/classes/shared/tasks.py @@ -452,7 +452,6 @@ class TasksManager: 'mem_percent': host_stats.get('mem_percent'), 'mem_usage': host_stats.get('mem_usage') }) - time.sleep(2) def log_watcher(self): self.controller.servers.check_for_old_logs()