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

pull/9631/head
-LAN- 2 years ago committed by GitHub
parent b14d59e977
commit e8abbe0623
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -15,6 +15,7 @@ class Storage:
def init_app(self, app: Flask): def init_app(self, app: Flask):
storage_factory = self.get_storage_factory(dify_config.STORAGE_TYPE) storage_factory = self.get_storage_factory(dify_config.STORAGE_TYPE)
with app.app_context():
self.storage_runner = storage_factory() self.storage_runner = storage_factory()
@staticmethod @staticmethod

Loading…
Cancel
Save