Merge branch 'bug/host-stats' into 'dev'

Fix task update polling

See merge request crafty-controller/crafty-commander!187
This commit is contained in:
Andrew 2022-03-05 01:56:19 +00:00
commit ff3da27333
2 changed files with 2 additions and 2 deletions

View File

@ -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)
#************************************************************************************************

View File

@ -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()