aiteamutils 0.2.39__tar.gz → 0.2.40__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/PKG-INFO +1 -1
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/dependencies.py +4 -24
- aiteamutils-0.2.40/aiteamutils/version.py +2 -0
- aiteamutils-0.2.39/aiteamutils/version.py +0 -2
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/.cursorrules +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/.gitignore +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/README.md +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/__init__.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/base_model.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/base_repository.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/base_service.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/cache.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/config.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/database.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/enums.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/exceptions.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/security.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/aiteamutils/validators.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/pyproject.toml +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/setup.py +0 -0
- {aiteamutils-0.2.39 → aiteamutils-0.2.40}/startup.py +0 -0
@@ -99,35 +99,15 @@ def get_service(name: str):
|
|
99
99
|
"""
|
100
100
|
def _get_service(db_service: DatabaseService = Depends(get_database_service)):
|
101
101
|
try:
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
except CustomException as e:
|
106
|
-
raise CustomException(
|
107
|
-
ErrorCode.SERVICE_NOT_REGISTERED,
|
108
|
-
detail=f"Service '{name}' is not registered",
|
109
|
-
source_function="dependencies.get_service",
|
110
|
-
original_error=e
|
111
|
-
)
|
112
|
-
|
113
|
-
# 서비스 인스턴스 생성
|
114
|
-
try:
|
115
|
-
repository = repository_class(db_service)
|
116
|
-
return service_class(repository)
|
117
|
-
except Exception as e:
|
118
|
-
raise CustomException(
|
119
|
-
ErrorCode.INTERNAL_ERROR,
|
120
|
-
detail=f"Failed to create service instance for '{name}': {str(e)}",
|
121
|
-
source_function="dependencies.get_service",
|
122
|
-
original_error=e
|
123
|
-
)
|
124
|
-
|
102
|
+
repository_class, service_class = service_registry.get(name)
|
103
|
+
repository = repository_class(db_service)
|
104
|
+
return service_class(repository, db_service)
|
125
105
|
except CustomException as e:
|
126
106
|
raise e
|
127
107
|
except Exception as e:
|
128
108
|
raise CustomException(
|
129
109
|
ErrorCode.INTERNAL_ERROR,
|
130
|
-
detail=f"
|
110
|
+
detail=f"Failed to create service '{name}': {str(e)}",
|
131
111
|
source_function="dependencies.get_service",
|
132
112
|
original_error=e
|
133
113
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|