fix circular import errors so the server and start again

This commit is contained in:
2026-04-06 04:30:02 +02:00
parent 98be2fe6fe
commit 43c7720480
8 changed files with 39 additions and 18 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
from .LocalStorage import LocalStorage
from .EdgeDB import EdgeDB
class StorageLoader:
@classmethod
def build(self, selected_storage: str):
def build(self, selected_storage:str) -> LocalStorage|EdgeDB:
storage_module = __import__(f"server.storage.{selected_storage}", fromlist=[selected_storage])
storage_class = getattr(storage_module, selected_storage)
return storage_class