internal 1.0.23__py3-none-any.whl → 1.0.24__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
@@ -38,6 +38,12 @@ class BaseFactory(metaclass=ABCMeta):
38
38
  Each factory should define what model it wants.
39
39
  """
40
40
 
41
+ @abstractmethod
42
+ async def init_state_cache(self, app, app_config):
43
+ """
44
+ Each factory should define what model it wants.
45
+ """
46
+
41
47
  @abstractmethod
42
48
  @lru_cache()
43
49
  def get_app_config(self):
@@ -86,6 +92,8 @@ class BaseFactory(metaclass=ABCMeta):
86
92
  document_model_list = await self.get_document_model_list()
87
93
  await init_beanie(database=app.state.db.get_database(), document_models=document_model_list)
88
94
  app.state.logger.info("Database connected")
95
+ await self.init_state_cache(app, self.get_app_config())
96
+ app.state.logger.info("Initialization state cache done")
89
97
 
90
98
  @app.on_event("shutdown")
91
99
  async def shutdown_db_client():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: internal
3
- Version: 1.0.23
3
+ Version: 1.0.24
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=5-s2muyaLOGKhrq8kVqq0qaXFD09FrcQZCAFmw1FQtk,1755
3
- internal/base_factory.py,sha256=Cxi0NQMiAiPNcbsyXqo_Ilc91TU3KbnLL1F6RIG9L08,7854
3
+ internal/base_factory.py,sha256=OeSgcQgObjYkLMjgG8LY4V2QDRd0esL1riQxg8cxnsk,8147
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
@@ -27,6 +27,6 @@ internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  internal/model/base_model.py,sha256=wnAKz21bXcbR4QqENc1_hKbUkzc8a8aT8oyhS9WT7kw,3032
28
28
  internal/model/operate.py,sha256=luEoP_Asvso_11qz1SAE1Kn5KxAnDRptM0VylC5tNik,1493
29
29
  internal/utils.py,sha256=0SubS0iUhDvjSX1F4TykasA5-enYJzt2VH-f7_0BnjI,1509
30
- internal-1.0.23.dist-info/METADATA,sha256=jakJGXVBUFO8w6Ht_ofDgKoMgjSKpqd1FuUuH8hPtEo,625
31
- internal-1.0.23.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
- internal-1.0.23.dist-info/RECORD,,
30
+ internal-1.0.24.dist-info/METADATA,sha256=Y7WlJID5mjN3AXVVDqdaQYSCL1BdTCjXG4S4b7n7gug,625
31
+ internal-1.0.24.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
+ internal-1.0.24.dist-info/RECORD,,