fix(db): support async MySQL sessions by converting mysql+pymysql to mysql+asyncmy#174
Merged
yhjun1026 merged 3 commits intoderisk-ai:mainderisk-ai/OpenDerisk:mainfrom Mar 23, 2026
niiish32x:fix/nsh_mysql_dbmanager_20260323niiish32x/OpenDerisk:fix/nsh_mysql_dbmanager_20260323Copy head branch name to clipboard
Merged
fix(db): support async MySQL sessions by converting mysql+pymysql to mysql+asyncmy#174yhjun1026 merged 3 commits intoderisk-ai:mainderisk-ai/OpenDerisk:mainfrom niiish32x:fix/nsh_mysql_dbmanager_20260323niiish32x/OpenDerisk:fix/nsh_mysql_dbmanager_20260323Copy head branch name to clipboard
yhjun1026 merged 3 commits intoderisk-ai:mainderisk-ai/OpenDerisk:mainfrom
niiish32x:fix/nsh_mysql_dbmanager_20260323niiish32x/OpenDerisk:fix/nsh_mysql_dbmanager_20260323Copy head branch name to clipboard
Conversation
…ns & user groups Plugin market - Avoid List full-screen Spin on catalog refresh so Switch/notifications stay clickable - Use App.useApp for message/notification; silent reload after plugin toggle - Keep initial load as the only blocking spinner User groups (权限组) - Split table blocking load vs silent refresh; only “刷新” spins on background reload - Use silent loadGroups after create/delete/member changes to avoid masking the panel Auth / user management - Allow POST /config/feature-plugins when user.role=admin in DB, not only oauth2.admin_users - Fix getUserId() to read user_no (OAuth) so user-id header matches DB user for admin checks
…mysql+asyncmy When using MySQL (mysql+pymysql://), the async engine was not created because only mysql+ob:// was converted to asyncmy. This caused '_async_session' to remain None and led to 'NoneType' object is not callable when using async database operations (e.g., chat conversations). Changes: - Add conversion for mysql+pymysql:// → mysql+asyncmy:// - Add conversion for plain mysql:// → mysql+asyncmy:// - Ensures async sessions work for standard MySQL configurations Fixes chat failures with MySQL: "TypeError: 'NoneType' object is not callable"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
fix(db): support async MySQL sessions by converting mysql+pymysql to mysql+asyncmy
When using MySQL (mysql+pymysql://), the async engine was not created because
only mysql+ob:// was converted to asyncmy. This caused '_async_session' to
remain None and led to 'NoneType' object is not callable when using
async database operations (e.g., chat conversations).
Changes:
Fixes chat failures with MySQL: "TypeError: 'NoneType' object is not callable"
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Snapshots:
Include snapshots for easier review.
Checklist: