internal 1.0.130__py3-none-any.whl → 1.1.1__py3-none-any.whl
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/http/requests.py
CHANGED
|
@@ -44,10 +44,10 @@ async def async_request(app: FastAPI, method, url, current_user: dict = None,
|
|
|
44
44
|
if "json" in kwargs:
|
|
45
45
|
kwargs["json"] = jsonable_encoder(kwargs["json"])
|
|
46
46
|
|
|
47
|
-
app.state.logger.info(f"async_request() request, url: {
|
|
47
|
+
app.state.logger.info(f"async_request() request, url: {method} {url} \nkwargs: {kwargs}")
|
|
48
48
|
response = await client.request(method, url, **kwargs)
|
|
49
49
|
app.state.logger.info(
|
|
50
|
-
f"async_request() response, url: {
|
|
50
|
+
f"async_request() response, url: {method} {url} \nkwargs: {kwargs} \n\nresponse.status_code: {response.status_code} \nresponse.text: {response.text}")
|
|
51
51
|
return response
|
|
52
52
|
except httpx.TimeoutException as exc:
|
|
53
53
|
app.state.logger.warn(
|
|
@@ -28,14 +28,12 @@ class LogRequestMiddleware(BaseHTTPMiddleware):
|
|
|
28
28
|
params = {k: v[0] if len(v) == 1 else v for k, v in temp.items()}
|
|
29
29
|
|
|
30
30
|
body = await request.body()
|
|
31
|
-
self.logger.info(
|
|
32
|
-
f"[Request id: {request_id}] Method: {method}, URL: {url} - Headers: {headers} - Params: {params} - Body: {body} start processing...")
|
|
31
|
+
self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nHeaders: {headers} \nstart processing...")
|
|
33
32
|
|
|
34
33
|
# 记录请求处理时间
|
|
35
34
|
start_time = time.time()
|
|
36
35
|
response = await call_next(request)
|
|
37
36
|
process_time = time.time() - start_time
|
|
38
37
|
|
|
39
|
-
self.logger.info(
|
|
40
|
-
f"[Request id: {request_id}] Method: {method}, URL: {url} - Headers: {headers} - Params: {params} - Body: {body}, Completed in {process_time:.4f} seconds")
|
|
38
|
+
self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nCompleted in {process_time:.4f} seconds")
|
|
41
39
|
return response
|
|
@@ -23,17 +23,17 @@ internal/ext/amazon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
23
23
|
internal/ext/amazon/aws/__init__.py,sha256=2YFjb-rHG1JaZGZiZffYDesgTAJjDshOqQbswOYzhP8,834
|
|
24
24
|
internal/ext/amazon/aws/const.py,sha256=l4WMg5bKWujwOKABBkCO2zclNg3abnYOfbhD7DG8GsA,109
|
|
25
25
|
internal/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
internal/http/requests.py,sha256=
|
|
26
|
+
internal/http/requests.py,sha256=cgzLPD0w_JdNh_I3w-dvOJwwrgPU7QtVH7OQtGaqFBM,3140
|
|
27
27
|
internal/http/responses.py,sha256=zvU0iRQ9-qxeEZfKmuvTi8lv9DFcaNAsHlQKOTCpVzw,2945
|
|
28
28
|
internal/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
internal/interface/base_interface.py,sha256=3YaVjIgLi_pZpLk5SEIk8WVkuICM8qPavT8rB0MdB5U,1536
|
|
30
30
|
internal/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
-
internal/middleware/log_request.py,sha256=
|
|
31
|
+
internal/middleware/log_request.py,sha256=01UeoCsjv38U0kZQwRqEspSbEUJDCb-WUN1TPrSAz7Y,1491
|
|
32
32
|
internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
33
|
internal/model/base_model.py,sha256=NWjysNOp2MfXvAHGFqaQA_l8ZfTFvJbXQPUPuOXN_2g,5361
|
|
34
34
|
internal/model/operate.py,sha256=QSM6yXYXpJMwrqkUGEWZLrEBaUgqHwVHY_Fi4S42hKc,3190
|
|
35
35
|
internal/utils.py,sha256=i6YZdiXsiWnOjRdlJ6afNCGpyMe3Uo9mhm3xlQBy3Ls,2824
|
|
36
36
|
internal/validator_utils.py,sha256=CqjaVFoAu5MqvBG_AkTP-r7AliWawtUWB851USj4moI,1519
|
|
37
|
-
internal-1.
|
|
38
|
-
internal-1.
|
|
39
|
-
internal-1.
|
|
37
|
+
internal-1.1.1.dist-info/METADATA,sha256=vSXyJBX7dIcwDU2QLOkUjZq5tkmgnYrBKaoeurMY03k,807
|
|
38
|
+
internal-1.1.1.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
|
39
|
+
internal-1.1.1.dist-info/RECORD,,
|
|
File without changes
|