internal 1.1.7__py3-none-any.whl → 1.1.9__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_config.py CHANGED
@@ -13,7 +13,7 @@ class BaseConfig(BaseSettings):
13
13
  # Request
14
14
  REQUEST_VERIFY_SSL: bool = False
15
15
  REQUEST_PROXY: str = ''
16
- REQUEST_RETRY_COUNT: int = 5
16
+ REQUEST_RETRY_COUNT: int = 3
17
17
  REQUEST_RETRY_DELAY_INITIAL_SECONDS: int = 1
18
18
  REQUEST_CONN_POOL_TIMEOUT: float = 5
19
19
  REQUEST_CONN_TIMEOUT: float = 5
internal/http/requests.py CHANGED
@@ -24,15 +24,12 @@ async def invoke_request(timeout: httpx.Timeout, method: str, url: str, app: Fas
24
24
  )
25
25
  return response
26
26
  except httpx.TimeoutException as exc:
27
- app.state.logger.warn(
28
- f"invoke_request(), TimeoutException, exc: {exc}, url: {url}, method: {method}, kwargs: {kwargs}")
29
- raise GatewayTimeoutException(
30
- f"invoke_request(), url: {url}, method: {method}, kwargs: {kwargs}, HTTP TimeoutError occurred: {exc}") from exc
27
+ app.state.logger.warn(f"invoke_request(), TimeoutException, exc: {exc}, url: {url}, method: {method}, kwargs: {kwargs}")
28
+ raise GatewayTimeoutException(str(exc)) from exc
31
29
  except Exception as exc:
32
30
  app.state.logger.warn(
33
31
  f"invoke_request(), Exception, exc: {exc}, url: {url}, method: {method}, kwargs: {kwargs}")
34
- raise BadGatewayException(
35
- f"invoke_request(), url: {url}, method: {method}, kwargs: {kwargs}, Error occurred: {exc}") from exc
32
+ raise BadGatewayException(str(exc))
36
33
 
37
34
 
38
35
  async def async_request(app: FastAPI, method, url, current_user: dict = None,
@@ -99,7 +96,7 @@ async def async_request(app: FastAPI, method, url, current_user: dict = None,
99
96
 
100
97
  async def invoke_webhook_message_api(app: FastAPI, message: str):
101
98
  payload = {"text": message}
102
- response = await async_request(app, "POST", app.state.config.WEBHOOK_BASE_URL, json=payload)
99
+ response = await async_request(app, "POST", app.state.config.WEBHOOK_BASE_URL, request_retry_count=0, json=payload)
103
100
  response.raise_for_status()
104
101
  return response
105
102
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: internal
3
- Version: 1.1.7
3
+ Version: 1.1.9
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -1,5 +1,5 @@
1
1
  internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- internal/base_config.py,sha256=3gOJxFW70lb9whTwsJt87Z0CLFUssw0tU7YDb2280e0,2280
2
+ internal/base_config.py,sha256=gbzgQklOzdQUY63b5k15dgk1sxVyYR4OcWXP0RHVNTI,2280
3
3
  internal/base_factory.py,sha256=DVWjOeCOURscykpm0MizOvT9PjbclpoVv92XySWMDkw,11353
4
4
  internal/cache_redis.py,sha256=YMsrUXHd-wKjsjsboD79Y-ciBBowzT6aAjdJZ36-yEY,697
5
5
  internal/common_enum/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -23,7 +23,7 @@ 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=yNGoTHzCSISaljArc40K_arnUeU6Y3K7U5pJEameklA,7861
26
+ internal/http/requests.py,sha256=84J3gDrlnFUxOxAqYkc_1nQOP0vlO4DJ5WBDQ0RXGmE,7660
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
@@ -34,6 +34,6 @@ internal/model/base_model.py,sha256=hxleV8fYNvFgUoYmCv_inEP3kA4tD4HhCBCNFVK8SZg,
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.1.7.dist-info/METADATA,sha256=W_8Em-DtofNIqceC6cuObuLGukuBepuVQXjd4Ayg9f4,938
38
- internal-1.1.7.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
39
- internal-1.1.7.dist-info/RECORD,,
37
+ internal-1.1.9.dist-info/METADATA,sha256=tITF_fGu6NGfSnUXn2iZTHkeRoSKIsY4BIh5idi9Obc,938
38
+ internal-1.1.9.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
39
+ internal-1.1.9.dist-info/RECORD,,