@@ -209,23 +209,23 @@ def start(self, module_name: str) -> None:
209209 else :
210210 logger .debug ("Manager tried to start nonexistent module {}" .format (module_name ))
211211
212- def autostart (self , autostart_modules : Optional [Set [str ]]) -> None :
212+ def autostart (self , autostart_modules : Optional [List [str ]]) -> None :
213213 if autostart_modules is None :
214- autostart_modules = set ()
214+ autostart_modules = []
215215 if len (autostart_modules ) > 0 :
216216 logger .info ("Modules to start weren't specified in CLI arguments. Falling back to configuration." )
217- autostart_modules = set (self .settings .autostart_modules )
218-
217+ autostart_modules = self .settings .autostart_modules
219218 # We only want to autostart modules that are both in found modules and are asked to autostart.
220- autostart_modules = autostart_modules .intersection (set (self .modules .keys ()))
221- # Always start aw-server first
222- if "aw-server" in autostart_modules :
223- self .start ("aw-server" )
224- elif "aw-server-rust" in autostart_modules :
219+ modules_to_start = set (autostart_modules ).intersection (set (self .modules .keys ()))
220+
221+ # Start aw-server-rust first
222+ if "aw-server-rust" in modules_to_start :
225223 self .start ("aw-server-rust" )
224+ elif "aw-server" in modules_to_start :
225+ self .start ("aw-server" )
226226
227- autostart_modules = set (autostart_modules ) - {"aw-server" , "aw-server-rust" }
228- for module_name in autostart_modules :
227+ modules_to_start = set (autostart_modules ) - {"aw-server" , "aw-server-rust" }
228+ for module_name in modules_to_start :
229229 self .start (module_name )
230230
231231 def stop_all (self ) -> None :
0 commit comments