fix: set default value to avoid initializing with empty value (#23220)
This commit is contained in:
@@ -12,10 +12,10 @@ from libs.email_i18n import EmailType, get_email_i18n_service
|
|||||||
|
|
||||||
redis_config = parse_url(dify_config.CELERY_BROKER_URL)
|
redis_config = parse_url(dify_config.CELERY_BROKER_URL)
|
||||||
celery_redis = Redis(
|
celery_redis = Redis(
|
||||||
host=redis_config["hostname"],
|
host=redis_config.get("hostname") or "localhost",
|
||||||
port=redis_config["port"],
|
port=redis_config.get("port") or 6379,
|
||||||
password=redis_config["password"],
|
password=redis_config.get("password") or None,
|
||||||
db=int(redis_config["virtual_host"]) if redis_config["virtual_host"] else 1,
|
db=int(redis_config.get("virtual_host")) if redis_config.get("virtual_host") else 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user