fixed delay in stats recording on load

This commit is contained in:
Phillip Tarrant 2020-08-24 19:16:33 -04:00
parent 8d5a3e680a
commit 7d91c9b636
2 changed files with 8 additions and 5 deletions

View File

@ -89,6 +89,7 @@ class TasksManager:
stats_update_frequency = int(helper.get_setting("CRAFTY", 'stats_update_frequency'))
logger.info("Stats collection frequency set to {stats} seconds".format(stats=stats_update_frequency))
console.info("Stats collection frequency set to {stats} seconds".format(stats=stats_update_frequency))
# one for now,
stats.record_stats()

12
main.py
View File

@ -91,6 +91,13 @@ if __name__ == '__main__':
installer.create_tables()
installer.default_settings()
# init servers
logger.info("Initializing all servers defined")
console.info("Initializing all servers defined")
controller.init_all_servers()
servers = controller.list_defined_servers()
# start stats logging
tasks_manager.start_stats_recording()
@ -100,12 +107,7 @@ if __name__ == '__main__':
# this should always be last
tasks_manager.start_main_kill_switch_watcher()
# init servers
logger.info("Initializing all servers defined")
console.info("Initializing all servers defined")
controller.init_all_servers()
servers = controller.list_defined_servers()
# our main loop - eventually a shell
while True: