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.
This pull request introduces support for Redis database switching, including configuration changes, new utility methods, and tools for managing databases. The main updates include adding environment variables and configuration options for database switching, implementing methods to handle blocked databases, and creating tools for database management such as switching, listing, and retrieving database information.
Configuration Updates:
.env.example
: AddedALLOW_DB_SWITCH
andBLOCKED_DBS
environment variables to control database switching and specify blocked databases.smithery.yaml
: Updated the configuration schema to includeallowDbSwitch
andblockedDbs
options, and mapped them to environment variables. [1] [2] [3]Redis Configuration Enhancements:
src/common/config.py
: Added support forALLOW_DB_SWITCH
andBLOCKED_DBS
in Redis configuration, including methods to check if a database is blocked and retrieve the list of blocked databases. [1] [2]Connection Management:
src/common/connection.py
: Refactored theRedisConnectionManager
class to support database switching, including methods to create connections for specific databases and handle blocked databases. [1] [2] [3]Database Management Tools:
src/tools/server_management.py
: Added tools for managing Redis databases, including switching databases, retrieving current database info, listing all databases, and handling blocked databases. [1] [2]