internal 0.1.97__tar.gz → 0.1.99__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of internal might be problematic. Click here for more details.
- {internal-0.1.97 → internal-0.1.99}/PKG-INFO +1 -1
- {internal-0.1.97 → internal-0.1.99}/pyproject.toml +1 -1
- {internal-0.1.97 → internal-0.1.99}/src/internal/base_config.py +1 -3
- {internal-0.1.97 → internal-0.1.99}/src/internal/base_factory.py +3 -3
- {internal-0.1.97 → internal-0.1.99}/src/internal/http/requests.py +3 -0
- {internal-0.1.97 → internal-0.1.99}/README.md +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/common_enum/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/common_enum/contact_type.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/common_enum/event_type.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/common_enum/operator_type.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/common_enum/service_ticket_event_trigger_type.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/const.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/database.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/exception/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/exception/base_exception.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/exception/internal_exception.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/ext/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/ext/amazon/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/ext/amazon/aws/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/ext/amazon/aws/const.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/http/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/http/responses.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/interface/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/interface/base_interface.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/model/__init__.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/model/base_model.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/model/operate.py +0 -0
- {internal-0.1.97 → internal-0.1.99}/src/internal/utils.py +0 -0
|
@@ -48,9 +48,7 @@ class BaseConfig(BaseSettings):
|
|
|
48
48
|
SCHEDULER_BASE_URL: str = "http://scheduler-service-api:5000"
|
|
49
49
|
|
|
50
50
|
# Exception Notify
|
|
51
|
-
|
|
52
|
-
SLACK_WEBHOOK_CHANNEL: str = ""
|
|
53
|
-
SLACK_WEBHOOK_USERNAME: str = ""
|
|
51
|
+
WEBHOOK_BASE_URL: str = ""
|
|
54
52
|
|
|
55
53
|
class Config:
|
|
56
54
|
case_sensitive = False
|
|
@@ -112,11 +112,11 @@ class BaseFactory(metaclass=ABCMeta):
|
|
|
112
112
|
async def http_exception_handler(request: Request, exc: Exception):
|
|
113
113
|
app.state.logger.warn(f"Exception, request:{request.__dict__}, exc:{exc}")
|
|
114
114
|
app.state.logger.warn(traceback.format_exc())
|
|
115
|
-
if self.get_app_config().
|
|
115
|
+
if self.get_app_config().WEBHOOK_BASE_URL:
|
|
116
116
|
message = f"【{self.DEFAULT_APP_NAME}】Unprocessed Exception, request:{request.__dict__}, exc:{exc}"
|
|
117
|
-
payload = {"
|
|
117
|
+
payload = {"text": message}
|
|
118
118
|
try:
|
|
119
|
-
await async_request(app, "POST", self.get_app_config().
|
|
119
|
+
await async_request(app, "POST", self.get_app_config().WEBHOOK_BASE_URL, json=payload)
|
|
120
120
|
except Exception as e:
|
|
121
121
|
app.state.logger.warn(f"Notify failure, Exception:{e}")
|
|
122
122
|
|
|
@@ -19,7 +19,10 @@ async def async_request(app: FastAPI, method, url, current_user: dict = None, **
|
|
|
19
19
|
|
|
20
20
|
try:
|
|
21
21
|
async with httpx.AsyncClient(timeout=timeout, verify=False) as client:
|
|
22
|
+
app.state.logger.info(f"async_request() request, url: {url}, method: {method}, kwargs: {kwargs}")
|
|
22
23
|
response = await client.request(method, url, **kwargs)
|
|
24
|
+
app.state.logger.info(
|
|
25
|
+
f"async_request() response, url: {url}, method: {method}, kwargs: {kwargs}, response: {response}")
|
|
23
26
|
return response
|
|
24
27
|
except httpx.TimeoutException as exc:
|
|
25
28
|
app.state.logger.warn(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{internal-0.1.97 → internal-0.1.99}/src/internal/common_enum/service_ticket_event_trigger_type.py
RENAMED
|
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
|
|
File without changes
|