internal 1.0.104__py3-none-any.whl → 1.0.106__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/base_factory.py +4 -0
- internal/common_enum/event_code.py +4 -1
- internal/common_enum/event_trigger_type.py +1 -0
- internal/common_enum/feature.py +1 -1
- internal/common_enum/notify_type.py +1 -0
- internal/const.py +1 -1
- {internal-1.0.104.dist-info → internal-1.0.106.dist-info}/METADATA +2 -1
- {internal-1.0.104.dist-info → internal-1.0.106.dist-info}/RECORD +9 -9
- {internal-1.0.104.dist-info → internal-1.0.106.dist-info}/WHEEL +0 -0
internal/base_factory.py
CHANGED
|
@@ -5,6 +5,7 @@ import traceback
|
|
|
5
5
|
from abc import ABCMeta, abstractmethod
|
|
6
6
|
from contextlib import asynccontextmanager
|
|
7
7
|
from functools import lru_cache
|
|
8
|
+
from asgi_correlation_id import CorrelationIdMiddleware
|
|
8
9
|
|
|
9
10
|
import dotenv
|
|
10
11
|
import watchtower
|
|
@@ -115,8 +116,11 @@ class BaseFactory(metaclass=ABCMeta):
|
|
|
115
116
|
allow_credentials=True,
|
|
116
117
|
allow_methods=["*"],
|
|
117
118
|
allow_headers=["*"],
|
|
119
|
+
expose_headers=['X-Request-ID']
|
|
118
120
|
)
|
|
119
121
|
|
|
122
|
+
app.add_middleware(CorrelationIdMiddleware)
|
|
123
|
+
|
|
120
124
|
self.__load_local_config()
|
|
121
125
|
app.state.config = self.get_app_config()
|
|
122
126
|
self.__setup_main_logger(app, level=logging.DEBUG)
|
|
@@ -30,4 +30,7 @@ class EventCodeEnum(str, Enum):
|
|
|
30
30
|
CAR_OUT_ACC = "car_out_acc"
|
|
31
31
|
|
|
32
32
|
LPR_CHANGE_STATE = "lpr_change_state"
|
|
33
|
-
LPR_CHANGE_POSITION = "lpr_change_position"
|
|
33
|
+
LPR_CHANGE_POSITION = "lpr_change_position"
|
|
34
|
+
|
|
35
|
+
REPAIR_OVERDUE = "repair_overdue"
|
|
36
|
+
DETAILING_OVERDUE = "detailing_overdue"
|
internal/common_enum/feature.py
CHANGED
internal/const.py
CHANGED
|
@@ -7,7 +7,7 @@ DT_FMT = f"{DATE_FMT} {TIME_FMT}:%S"
|
|
|
7
7
|
|
|
8
8
|
DEFAULT_LOGGER_NAME = "uvicorn"
|
|
9
9
|
LOG_DT_FMT = f"{DT_FMT},%03d"
|
|
10
|
-
LOG_FMT_NO_DT = "[%(levelname)7s][%(name)s][%(filename)s::%(funcName)s(%(lineno)s)]: %(message)s"
|
|
10
|
+
LOG_FMT_NO_DT = "[%(levelname)7s][%(correlation_id)s][%(name)s][%(filename)s::%(funcName)s(%(lineno)s)]: %(message)s"
|
|
11
11
|
LOG_FMT = "[%(asctime)s]" + LOG_FMT_NO_DT
|
|
12
12
|
|
|
13
13
|
ARR_EXPORT_SHORT_FMT = "MM/DD HH:mm"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: internal
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.106
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Ray
|
|
6
6
|
Author-email: ray@cruisys.com
|
|
@@ -10,6 +10,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
12
|
Requires-Dist: arrow (>=1.3.0,<2.0.0)
|
|
13
|
+
Requires-Dist: asgi-correlation-id (>=4.3.4,<5.0.0)
|
|
13
14
|
Requires-Dist: beanie (>=1.29.0,<2.0.0)
|
|
14
15
|
Requires-Dist: dictdiffer (>=0.9.0,<0.10.0)
|
|
15
16
|
Requires-Dist: fastapi (>=0.115.6,<0.116.0)
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
internal/base_config.py,sha256=CtGIJhMSYsJQxvfkr5rZxuuXpGUY9RYyAf-p8MDv2pM,2142
|
|
3
|
-
internal/base_factory.py,sha256=
|
|
3
|
+
internal/base_factory.py,sha256=KoXaEibkb2GsAqbjzj0HFiG9JaRs4ta5Be9bE-Qguak,11001
|
|
4
4
|
internal/cache_redis.py,sha256=YMsrUXHd-wKjsjsboD79Y-ciBBowzT6aAjdJZ36-yEY,697
|
|
5
5
|
internal/common_enum/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
internal/common_enum/contact_type.py,sha256=7QkTQ71UxpaT1YHI40FpjmLz3r-UbRU-sd0m5ajH1as,142
|
|
7
7
|
internal/common_enum/description_type.py,sha256=kGwkFQh6dMnjDl6ipWYpA-qbNRrhEpnPq3NleTsNwwk,118
|
|
8
8
|
internal/common_enum/device_code.py,sha256=lDTqRmP8zl6-k62HCsRehNAKCTXxH6WltZnvijy8Ijc,223
|
|
9
|
-
internal/common_enum/event_code.py,sha256=
|
|
10
|
-
internal/common_enum/event_trigger_type.py,sha256=
|
|
11
|
-
internal/common_enum/feature.py,sha256=
|
|
9
|
+
internal/common_enum/event_code.py,sha256=L-1Q14pPTXkmE6XgpRQouB6cmat6sTyPGS3zI5jkFRQ,1880
|
|
10
|
+
internal/common_enum/event_trigger_type.py,sha256=OwGToYb02bBB1_XX6svuoq0zssTR2YQzncm0JfA0Fjs,1799
|
|
11
|
+
internal/common_enum/feature.py,sha256=JYjug8-LVbZErwhdmK3y8ljvlQPffBcI6EsdJ5Mtpj8,113
|
|
12
12
|
internal/common_enum/lpr_direction.py,sha256=glCGSkcXHUB6_p2jO_7IdEHycyFVhu0vHDDDXbFJ174,113
|
|
13
|
-
internal/common_enum/notify_type.py,sha256=
|
|
13
|
+
internal/common_enum/notify_type.py,sha256=nXPe6qziCwonn5ARIpq0vfc5n6dOBDMQwimPpHyrNUM,187
|
|
14
14
|
internal/common_enum/operator_type.py,sha256=XfHwGDsuOG6-ajitDoRuLFLT1LhHKoXXzFRW4e5vmJ8,173
|
|
15
15
|
internal/common_enum/order_type.py,sha256=XwAl5JaZgFLahBQhBKG4VuMJ39Si9KZEhcSS0-DKKzQ,90
|
|
16
|
-
internal/const.py,sha256=
|
|
16
|
+
internal/const.py,sha256=gcUn6kINa7PqxmL05agLp5FFd8Nl8jcZrPPsdXM5tKI,1126
|
|
17
17
|
internal/database.py,sha256=1u53JnFJ0jvP7H4HPY2faA2ABdPQ8SlsZigYmQAPktI,2470
|
|
18
18
|
internal/exception/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
internal/exception/app_exception.py,sha256=z7BGD0iw0VW5rczQb-sjnfxk1O_E6CPWMnBUfddU-0g,3467
|
|
@@ -35,6 +35,6 @@ internal/model/base_model.py,sha256=NWjysNOp2MfXvAHGFqaQA_l8ZfTFvJbXQPUPuOXN_2g,
|
|
|
35
35
|
internal/model/operate.py,sha256=QSM6yXYXpJMwrqkUGEWZLrEBaUgqHwVHY_Fi4S42hKc,3190
|
|
36
36
|
internal/utils.py,sha256=i6YZdiXsiWnOjRdlJ6afNCGpyMe3Uo9mhm3xlQBy3Ls,2824
|
|
37
37
|
internal/validator_utils.py,sha256=5ZLcNIgw1hvkYOj1f6gS9AYxe7Y3ufW9FyDxUS7FsMQ,1226
|
|
38
|
-
internal-1.0.
|
|
39
|
-
internal-1.0.
|
|
40
|
-
internal-1.0.
|
|
38
|
+
internal-1.0.106.dist-info/METADATA,sha256=6Ie90kTCYUdNBwuE0n10p3p3pcrzs4Yo-rK2GiKwtlU,809
|
|
39
|
+
internal-1.0.106.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
|
40
|
+
internal-1.0.106.dist-info/RECORD,,
|
|
File without changes
|