The scheduler now uses an interted module list

This help with cleaning up unused logger instances.
This commit is contained in:
JeremyStar™ 2024-05-11 12:17:21 +02:00
parent 5c94ec058d
commit eaa5ce2a2d
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -146,7 +146,9 @@ func initialize_scheduler() -> void:
scheduler.process_mode = Node.PROCESS_MODE_ALWAYS scheduler.process_mode = Node.PROCESS_MODE_ALWAYS
scheduler.connect("timeout", func() -> void: scheduler.connect("timeout", func() -> void:
loggeri.verb("Running scheduler tasks") loggeri.verb("Running scheduler tasks")
for module in modules: await get(module)._schedule() var modules_reverse: Array[String] = modules.duplicate()
modules_reverse.reverse()
for module in modules_reverse: await get(module)._schedule()
for module in custom_modules_node.get_children(): await module._schedule() for module in custom_modules_node.get_children(): await module._schedule()
) )