internal 1.0.90__tar.gz → 1.0.98__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-1.0.90 → internal-1.0.98}/PKG-INFO +1 -1
- {internal-1.0.90 → internal-1.0.98}/pyproject.toml +1 -1
- {internal-1.0.90 → internal-1.0.98}/src/internal/base_config.py +1 -0
- internal-1.0.98/src/internal/common_enum/device_code.py +10 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/event_trigger_type.py +3 -0
- internal-1.0.90/src/internal/common_enum/lpnr_direction.py → internal-1.0.98/src/internal/common_enum/lpr_direction.py +1 -1
- {internal-1.0.90 → internal-1.0.98}/src/internal/const.py +2 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/model/base_model.py +2 -1
- {internal-1.0.90 → internal-1.0.98}/src/internal/utils.py +10 -1
- {internal-1.0.90 → internal-1.0.98}/README.md +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/base_factory.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/cache_redis.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/contact_type.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/description_type.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/event_code.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/feature.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/notify_type.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/operator_type.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/order_type.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/database.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/exception/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/exception/app_exception.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/exception/base_exception.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/exception/internal_exception.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/ext/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/ext/amazon/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/ext/amazon/aws/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/ext/amazon/aws/const.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/http/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/http/requests.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/http/responses.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/interface/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/interface/base_interface.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/middleware/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/middleware/log_request.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/model/__init__.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/model/operate.py +0 -0
- {internal-1.0.90 → internal-1.0.98}/src/internal/validator_utils.py +0 -0
|
@@ -48,6 +48,7 @@ class BaseConfig(BaseSettings):
|
|
|
48
48
|
NOTIFY_BASE_URL: str = "http://notify-service-api:5000"
|
|
49
49
|
THIRD_PARTY_BASE_URL: str = "http://third-party-service-api:5000"
|
|
50
50
|
SCHEDULER_BASE_URL: str = "http://scheduler-service-api:5000"
|
|
51
|
+
AUTO_DATA_PROCESSING_BASE_URL: str = "http://auto-data-processing-service-api:5000"
|
|
51
52
|
|
|
52
53
|
# Exception Notify
|
|
53
54
|
WEBHOOK_BASE_URL: str = ""
|
|
@@ -15,12 +15,13 @@ from .operate import Operate
|
|
|
15
15
|
from ..const import DEF_PAGE_SIZE, DEF_PAGE_NO
|
|
16
16
|
from ..exception.internal_exception import NoChangeException
|
|
17
17
|
from ..common_enum.order_type import OrderTypeEnum
|
|
18
|
+
from ..utils import get_current_utc
|
|
18
19
|
|
|
19
20
|
IncEx: TypeAlias = Union[Set[int], Set[str], Mapping[int, Union['IncEx', bool]], Mapping[str, Union['IncEx', bool]]]
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
class InternalBaseDocument(Document):
|
|
23
|
-
create_time: datetime = Field(default_factory=
|
|
24
|
+
create_time: datetime = Field(default_factory=get_current_utc)
|
|
24
25
|
update_time: Optional[datetime] = None
|
|
25
26
|
|
|
26
27
|
@classmethod
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
import json
|
|
3
|
+
from datetime import datetime, timezone
|
|
3
4
|
|
|
4
5
|
import arrow
|
|
5
6
|
|
|
6
7
|
from .base_config import BaseConfig
|
|
7
|
-
from .const import STR_EMPTY, ARR_EXPORT_DATETIME_FMT, STR_DASH
|
|
8
|
+
from .const import STR_EMPTY, ARR_EXPORT_DATETIME_FMT, STR_DASH, REDIS_LPR_DATA_LIST_PREFIX
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def is_today(time, system_time_zone):
|
|
@@ -48,3 +49,11 @@ def update_dict_with_cast(curr_settings: BaseConfig, new_conf: dict):
|
|
|
48
49
|
|
|
49
50
|
def sanitize_plate_no(plate_no):
|
|
50
51
|
return plate_no.replace(STR_DASH, STR_EMPTY).upper()
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def get_current_utc() -> datetime:
|
|
55
|
+
return datetime.now(timezone.utc)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def get_lpr_data_list_redis_key(organization_id, plate_no):
|
|
59
|
+
return f"{REDIS_LPR_DATA_LIST_PREFIX}_{organization_id}_{plate_no}"
|
|
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
|
|
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
|