Create settings singelton for client, server, task settings#202
Open
Ekyoz wants to merge 1 commit into
Open
Conversation
6255fce to
8235f21
Compare
2574316 to
5344c3c
Compare
…arameters feat(client): add top-level gRPC client settings and channel configuration feat(client_settings): Update client settings structure and improve task management configurations feat(client_settings): Update client and server configuration settings in .env.example and related files Signed-off-by: Alexandre <a.tresallet@digitalkin.ai>
5344c3c to
e85aac0
Compare
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.
This pull request refactors configuration management throughout the codebase to use centralized settings objects instead of reading from environment variables at runtime. This improves maintainability, testability, and consistency of configuration across the application. Key areas affected include task management, gRPC server and client initialization, and module servicing.
Configuration Centralization and Refactoring:
Replaced direct environment variable access in
BaseTaskManagerwith aTaskSettingsobject, updating all references to task concurrency, queue, and timeout parameters to use this settings object. (src/digitalkin/core/task_manager/base_task_manager.py) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Updated
GrpcClientWrapperto use aClientSettingsobject for all gRPC client configuration, including channel security and retry settings, instead of reading from environment variables. (src/digitalkin/grpc_servers/utils/grpc_client_wrapper.py) [1] [2] [3]gRPC Server and Servicer Improvements:
Modified gRPC server startup (
_base_server.py) to rely on aServerSettingsobject for enabling and configuring the asyncio inspector, rather than environment variables. (src/digitalkin/grpc_servers/_base_server.py)Refactored
ModuleServicerand its usage to accept and use aServerSettingsobject for settings such as setup cache size and completion timeout, removing environment variable dependencies. (src/digitalkin/grpc_servers/module_servicer.py,src/digitalkin/grpc_servers/module_server.py) [1] [2] [3] [4] [5] [6] [7] [8]These changes collectively move the codebase toward a more robust and testable configuration approach, reducing reliance on environment variables and improving clarity of configuration dependencies.