@@ -113,9 +113,6 @@ def __init__(self, logging: "Logging", loop: BaseEventLoop, ad_config_model: App
113113 self .global_vars : Any = {}
114114 self .main_thread_id = threading .current_thread ().ident
115115
116- if not self .apps :
117- self .logging .log ("INFO" , "Apps are disabled" )
118-
119116 # Initialize subsystems
120117 self .callbacks = Callbacks (self )
121118 self .events = Events (self )
@@ -125,7 +122,9 @@ def __init__(self, logging: "Logging", loop: BaseEventLoop, ad_config_model: App
125122 self .state = State (self )
126123 self .futures = Futures (self )
127124
128- if self .apps is True :
125+ if not self .apps :
126+ self .logger .info ("Apps are disabled, skipping app management initialization" )
127+ else :
129128 assert self .config_dir is not None , "Config_dir not set. This is a development problem"
130129 assert self .config_dir .exists (), f"{ self .config_dir } does not exist"
131130 assert os .access (
@@ -146,12 +145,13 @@ def __init__(self, logging: "Logging", loop: BaseEventLoop, ad_config_model: App
146145 self .logger .info (f"Using { self .app_dir } as app_dir" )
147146
148147 self .app_management = AppManagement (self )
149- self .threading = Threading (self )
150148
151- # Create ThreadAsync loop
152- self .logger .debug ("Starting thread_async loop" )
153- self .thread_async = ThreadAsync (self )
154- loop .create_task (self .thread_async .loop ())
149+ self .threading = Threading (self )
150+
151+ # Create ThreadAsync loop
152+ self .logger .debug ("Starting thread_async loop" )
153+ self .thread_async = ThreadAsync (self )
154+ loop .create_task (self .thread_async .loop ())
155155
156156 self .executor = ThreadPoolExecutor (max_workers = self .threadpool_workers )
157157
0 commit comments