fix database connect fail when password contain "@"

# 
MYSQL_PASSWORD = "test@1234"
python app.py will run fail.

Signed-off-by: 彭华林 <12873625+hualpeng@user.noreply.gitee.com>
This commit is contained in:
彭华林
2023-05-02 16:31:59 +00:00
committed by Gitee
parent a340533ff9
commit 31a6c83222
+1 -1
View File
@@ -70,7 +70,7 @@ class BaseConfig:
SCHEDULER_API_ENABLED = False
SCHEDULER_JOBSTORES: dict = {
'default': SQLAlchemyJobStore(
url=f'mysql+pymysql://{MYSQL_USERNAME}:{MYSQL_PASSWORD}@{MYSQL_HOST}:{MYSQL_PORT}/{MYSQL_DATABASE}')
url=f'mysql+pymysql://{MYSQL_USERNAME}:{urlquote(MYSQL_PASSWORD)}@{MYSQL_HOST}:{MYSQL_PORT}/{MYSQL_DATABASE}')
}
SCHEDULER_EXECUTORS: dict = {
'default': ThreadPoolExecutor(20)