fix(datasource): Fix datasource resource error (#2394)

This commit is contained in:
yyhhyy 2025-03-04 22:32:33 +08:00 committed by GitHub
commit 1a3970959b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -186,3 +186,4 @@ thirdparty
/examples/**/*.gv.pdf
/i18n/locales/**/**/*_ai_translated.po
/i18n/locales/**/**/*~
configs/my

View File

@ -39,6 +39,7 @@ class DBResource(Resource[P], Generic[P]):
dialect: Optional[str] = None,
executor: Optional[Executor] = None,
prompt_template: str = _DEFAULT_PROMPT_TEMPLATE,
**kwargs,
):
"""Initialize the DB resource."""
self._name = name

View File

@ -66,7 +66,7 @@ def _generate_key_from_password(
algorithm=hashes.SHA256(),
length=32,
salt=salt,
iterations=100000,
iterations=800000,
)
key = base64.urlsafe_b64encode(kdf.derive(password))
return key, salt