maleo-foundation 0.1.24__py3-none-any.whl → 0.1.26__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.
@@ -386,7 +386,13 @@ class ServiceManager:
386
386
  def run_app(self) -> None:
387
387
  if self._settings.ENVIRONMENT == BaseEnums.EnvironmentType.LOCAL:
388
388
  import importlib.util
389
+ import logging
389
390
  import sys
391
+
392
+ # Configure logging
393
+ logging.basicConfig(level=logging.DEBUG)
394
+ logger = logging.getLogger(__name__)
395
+
390
396
  # Get the module path and add it to sys.path if needed
391
397
  spec = importlib.util.find_spec("app")
392
398
  if spec and spec.origin:
@@ -394,11 +400,23 @@ class ServiceManager:
394
400
  if module_path not in sys.path:
395
401
  sys.path.insert(0, module_path)
396
402
 
403
+ logger.debug(f"Module path: {module_path}")
397
404
  # Create the import string for uvicorn
398
405
  app_import_string = "app.main:app"
399
-
400
- # Run with reload enabled
401
- uvicorn.run(app_import_string, host=self._configs.service.host, port=self._configs.service.port, reload=True)
406
+ logger.debug(f"Using import string: {app_import_string}")
407
+
408
+ try:
409
+ uvicorn.run(
410
+ app_import_string,
411
+ host=self._configs.service.host,
412
+ port=self._configs.service.port,
413
+ reload=True,
414
+ log_level="debug",
415
+ reload_dirs=[os.path.dirname(os.path.dirname(spec.origin))]
416
+ )
417
+ except Exception as e:
418
+ logger.error(f"Error starting uvicorn: {e}")
419
+ raise
402
420
  else:
403
421
  uvicorn.run(self._app, host=self._configs.service.host, port=self._configs.service.port)
404
422
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.1.24
3
+ Version: 0.1.26
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -32,7 +32,7 @@ maleo_foundation/expanded_types/token.py,sha256=4fRTJw6W5MYq71NksNrWNi7qYHQ4_lQw
32
32
  maleo_foundation/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  maleo_foundation/managers/db.py,sha256=Jf0w-9JOAG5X2quDxqqw6d2WUIX7MYGdlPGxWP0rxHs,4699
34
34
  maleo_foundation/managers/middleware.py,sha256=7CDXPMb28AR7J72TWOeKFxOlMypKezEtO9mr53a88B0,4032
35
- maleo_foundation/managers/service.py,sha256=DLp2y7tPQVyBCg8TB5nraeDz4Z5uX-Tr-9thA49QhuE,20040
35
+ maleo_foundation/managers/service.py,sha256=MvIdS_PKWFtl9TD7YL3o0Jjm9EoR3hn4EG7ddlEWtKU,20696
36
36
  maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  maleo_foundation/managers/client/base.py,sha256=K8AFV2MTZrC1jbTqxkx7eedmxodJirNIjoRXGGcppy4,1022
38
38
  maleo_foundation/managers/client/http.py,sha256=dWFZlG1z4TERYBITReR5oSrlzvdhh2EtztVnsU8gCeA,2712
@@ -83,7 +83,7 @@ maleo_foundation/utils/logging.py,sha256=MwvZmZSA8SIdfq-knEvpYIgqnSpHcyHrZY9TVHW
83
83
  maleo_foundation/utils/query.py,sha256=ODQ3adOYQNj5E2cRW9ytbjBz56nEDcnfq8mQ6YZbCCM,4375
84
84
  maleo_foundation/utils/formatter/__init__.py,sha256=iKf5YCbEdg1qKnFHyKqqcQbqAqEeRUf8mhI3v3dQoj8,78
85
85
  maleo_foundation/utils/formatter/case.py,sha256=TmvvlfzGdC_omMTB5vAa40TZBxQ3hnr-SYeo0M52Rlg,1352
86
- maleo_foundation-0.1.24.dist-info/METADATA,sha256=7yxL5FgFIua_89OydBwsndTLQPfKvMqAZamurVMUHnE,3190
87
- maleo_foundation-0.1.24.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
88
- maleo_foundation-0.1.24.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
89
- maleo_foundation-0.1.24.dist-info/RECORD,,
86
+ maleo_foundation-0.1.26.dist-info/METADATA,sha256=xNoNLJuDCRviX2VxaXTzzVZr1oLUkCdMy_hBRXrBCFA,3190
87
+ maleo_foundation-0.1.26.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
88
+ maleo_foundation-0.1.26.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
89
+ maleo_foundation-0.1.26.dist-info/RECORD,,