internal 1.1.28__py3-none-any.whl → 1.1.28b0__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/const.py CHANGED
@@ -44,12 +44,7 @@ REDIS_LPR_DATA_LIST_PREFIX = "lpr_data_list"
44
44
 
45
45
  CORRELATION_ID_HEADER_KEY_NAME = "X-Request-ID"
46
46
 
47
- SOURCE_CAR_BY_SMART_WORKSHOP_IMPORTED_SERVICE_TICKET = 'CarBySmartWorkshopImportedServiceTicket'
48
- SOURCE_CAR_BY_SMART_WORKSHOP_IMPORTED_DMS_DATA = 'CarBySmartWorkshopImportedDMSData'
49
- SOURCE_CAR_BY_WEBHOOK = 'CarByWebhook'
50
- SOURCE_CAR_BY_SMART_WORKSHOP = 'CarBySmartWorkshopManual'
51
-
52
- SOURCE_CUSTOMER_BY_SMART_WORKSHOP_IMPORTED_SERVICE_TICKET = 'CustomerBySmartWorkshopImportedServiceTicket'
53
- SOURCE_CUSTOMER_BY_SMART_WORKSHOP_IMPORTED_DMS_DATA = 'CustomerBySmartWorkshopImportedDMSData'
54
- SOURCE_CUSTOMER_BY_WEBHOOK = 'CustomerByWebhook'
55
- SOURCE_CUSTOMER_BY_SMART_WORKSHOP = 'CustomerBySmartWorkshopManual'
47
+ SOURCE_SMART_WORKSHOP_IMPORTED_SERVICE_TICKET = 'SmartWorkshopImportedServiceTicket'
48
+ SOURCE_SMART_WORKSHOP_IMPORTED_DMS_DATA = 'SmartWorkshopImportedDMSData'
49
+ SOURCE_WEBHOOK = 'Webhook'
50
+ SOURCE_SMART_WORKSHOP = 'SmartWorkshopManual'
@@ -28,12 +28,18 @@ 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(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nHeaders: {headers} \nstart processing...")
31
+ if "multipart" in headers.get("content-type"):
32
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: 因上傳檔案不顯示body \nHeaders: {headers} \nstart processing...")
33
+ else:
34
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nHeaders: {headers} \nstart processing...")
32
35
 
33
36
  # 记录请求处理时间
34
37
  start_time = time.time()
35
38
  response = await call_next(request)
36
39
  process_time = time.time() - start_time
37
40
 
38
- self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nCompleted in {process_time:.4f} seconds")
41
+ if "multipart" in headers.get("content-type"):
42
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: 因上傳檔案不顯示body \nCompleted in {process_time:.4f} seconds")
43
+ else:
44
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nCompleted in {process_time:.4f} seconds")
39
45
  return response
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: internal
3
- Version: 1.1.28
3
+ Version: 1.1.28b0
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -12,7 +12,7 @@ internal/common_enum/notify_type.py,sha256=p01d9ODiJ9vDpFBJ55bhu7WOyO7Te3slToOhv
12
12
  internal/common_enum/operator_type.py,sha256=XfHwGDsuOG6-ajitDoRuLFLT1LhHKoXXzFRW4e5vmJ8,173
13
13
  internal/common_enum/order_type.py,sha256=XwAl5JaZgFLahBQhBKG4VuMJ39Si9KZEhcSS0-DKKzQ,90
14
14
  internal/common_enum/websocket_channel.py,sha256=BIhdE2z_xF3lgStS8GiaS5M8BXm4_g3vHQaaN5qNJTQ,283
15
- internal/const.py,sha256=rbXINbxly2ZQMKqCzR4otdMzQ11FB2qRaq1iP3bsHYk,1774
15
+ internal/const.py,sha256=1jQ5jkcIVAGsgvWCqTIUOvlo5tAsYAkq3Ei4UmAu3EU,1406
16
16
  internal/database.py,sha256=1u53JnFJ0jvP7H4HPY2faA2ABdPQ8SlsZigYmQAPktI,2470
17
17
  internal/exception/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  internal/exception/app_exception.py,sha256=4HE1BrXBuMTuukwEYJhz_gxS6eIqHpSBFB99J62BHJ0,3803
@@ -28,12 +28,12 @@ internal/http/responses.py,sha256=zvU0iRQ9-qxeEZfKmuvTi8lv9DFcaNAsHlQKOTCpVzw,29
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=01UeoCsjv38U0kZQwRqEspSbEUJDCb-WUN1TPrSAz7Y,1491
31
+ internal/middleware/log_request.py,sha256=cLOEKmsE5KpXmJSqy5Jqiz61vCsJAK1PXxsIyIq36Nc,1998
32
32
  internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  internal/model/base_model.py,sha256=hxleV8fYNvFgUoYmCv_inEP3kA4tD4HhCBCNFVK8SZg,5509
34
34
  internal/model/operate.py,sha256=QSM6yXYXpJMwrqkUGEWZLrEBaUgqHwVHY_Fi4S42hKc,3190
35
35
  internal/utils.py,sha256=wK1QumW1AaWE1ga2-WcDH2rtXRr2hSLwXzy-iI5dTzY,3962
36
36
  internal/validator_utils.py,sha256=CqjaVFoAu5MqvBG_AkTP-r7AliWawtUWB851USj4moI,1519
37
- internal-1.1.28.dist-info/METADATA,sha256=cooimmslAEdMYaax0pUl-DbxGpvERqc92btA6j4nXQ8,939
38
- internal-1.1.28.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
39
- internal-1.1.28.dist-info/RECORD,,
37
+ internal-1.1.28b0.dist-info/METADATA,sha256=2vB7oJF_QeJP8DYccq5ilc3AOWDd4bUHXRBGo66i05o,941
38
+ internal-1.1.28b0.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
39
+ internal-1.1.28b0.dist-info/RECORD,,