Преглед изворни кода

fix(storage): ensure `storage_runner` initialization within app context (#9627)

tags/0.10.1
-LAN- пре 1 година
родитељ
комит
e8abbe0623
No account linked to committer's email address
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2
    1
      api/extensions/ext_storage.py

+ 2
- 1
api/extensions/ext_storage.py Прегледај датотеку

@@ -15,7 +15,8 @@ class Storage:

def init_app(self, app: Flask):
storage_factory = self.get_storage_factory(dify_config.STORAGE_TYPE)
self.storage_runner = storage_factory()
with app.app_context():
self.storage_runner = storage_factory()

@staticmethod
def get_storage_factory(storage_type: str) -> type[BaseStorage]:

Loading…
Откажи
Сачувај