mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
Fix/grpc gevent compatible (#1314)
Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
@ -6,6 +6,9 @@ from werkzeug.exceptions import Unauthorized
|
||||
if not os.environ.get("DEBUG") or os.environ.get("DEBUG").lower() != 'true':
|
||||
from gevent import monkey
|
||||
monkey.patch_all()
|
||||
if os.environ.get("VECTOR_STORE") == 'milvus':
|
||||
import grpc.experimental.gevent
|
||||
grpc.experimental.gevent.init_gevent()
|
||||
|
||||
import logging
|
||||
import json
|
||||
|
||||
Reference in New Issue
Block a user