internal 1.0.49__py3-none-any.whl → 1.0.50__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 CHANGED
@@ -62,6 +62,7 @@ class BaseFactory(metaclass=ABCMeta):
62
62
 
63
63
  @asynccontextmanager
64
64
  async def lifespan(app: FastAPI):
65
+ # code to execute when app is loading
65
66
  await mongodb.connect()
66
67
  document_model_list = await self.get_document_model_list()
67
68
  await init_beanie(database=app.state.db.get_database(), document_models=document_model_list)
@@ -70,10 +71,13 @@ class BaseFactory(metaclass=ABCMeta):
70
71
  app.state.logger.info("Initialization state cache done")
71
72
  await self.init_state_scheduler_app(app, self.get_app_config())
72
73
  app.state.logger.info("Initialization state scheduler app done")
74
+
73
75
  yield
76
+ # code to execute when app is shutting down
74
77
  await mongodb.close()
75
78
  app.state.logger.info("Database disconnected")
76
79
 
80
+
77
81
  if title is None:
78
82
  title = self.DEFAULT_APP_NAME
79
83
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: internal
3
- Version: 1.0.49
3
+ Version: 1.0.50
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -1,6 +1,6 @@
1
1
  internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  internal/base_config.py,sha256=ZdqvHlPsF6ozELgmV0ZiSpYehSscasIclLp8eAjVE24,1870
3
- internal/base_factory.py,sha256=kdwWVIzOCrZBDdZxgMgjLpLU6WaB2PXzim9SKBormSs,8854
3
+ internal/base_factory.py,sha256=0MQNsJrGwYIdibkg1iqptxA7hyYc-S2Pj4IjGuIA2rM,8962
4
4
  internal/common_enum/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  internal/common_enum/contact_type.py,sha256=7QkTQ71UxpaT1YHI40FpjmLz3r-UbRU-sd0m5ajH1as,142
6
6
  internal/common_enum/description_type.py,sha256=kGwkFQh6dMnjDl6ipWYpA-qbNRrhEpnPq3NleTsNwwk,118
@@ -28,6 +28,6 @@ internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  internal/model/base_model.py,sha256=NS_GZvw_IqU1aZPHPpyQs6A741O34ybmzVzBPm9nGWU,3014
29
29
  internal/model/operate.py,sha256=luEoP_Asvso_11qz1SAE1Kn5KxAnDRptM0VylC5tNik,1493
30
30
  internal/utils.py,sha256=0SubS0iUhDvjSX1F4TykasA5-enYJzt2VH-f7_0BnjI,1509
31
- internal-1.0.49.dist-info/METADATA,sha256=GeWqdds8wsOsUhlzsEu6Y0H8RrBHPmUCW1msxm8qb18,625
32
- internal-1.0.49.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
- internal-1.0.49.dist-info/RECORD,,
31
+ internal-1.0.50.dist-info/METADATA,sha256=21ZTXLdhaJ_Wm_YWqy5pE-JtsYdHhZ08Ycv0cm5LE7o,625
32
+ internal-1.0.50.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
+ internal-1.0.50.dist-info/RECORD,,