From: Marcel van der Veldt Date: Wed, 25 Feb 2026 11:53:17 +0000 (+0100) Subject: Wait for providers to load at startup X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=7166829704cbaf4684b5c96e4d7311179dafecda;p=music-assistant-server.git Wait for providers to load at startup --- diff --git a/music_assistant/mass.py b/music_assistant/mass.py index 44e59de4..e2ec01a1 100644 --- a/music_assistant/mass.py +++ b/music_assistant/mass.py @@ -896,10 +896,11 @@ class MusicAssistant: ) ] # load providers concurrently via tasks - for prov_conf in other_configs: - # Use a task so we can load multiple providers at once. - # If a provider fails, that will not block the loading of other providers. - self.create_task(self.load_provider(prov_conf.instance_id, allow_retry=True)) + async with TaskManager(self, 2) as tg: + for prov_conf in other_configs: + # Use a task so we can load multiple providers at once. + # If a provider fails, that will not block the loading of other providers. + tg.create_task(self.load_provider(prov_conf.instance_id, allow_retry=True)) async def _load_provider(self, conf: ProviderConfig) -> None: """Load (or reload) a provider."""