jrobinAV 1 год назад
Родитель
Сommit
704a5243c9
1 измененных файлов с 9 добавлено и 6 удалено
  1. 9 6
      taipy/core/_core.py

+ 9 - 6
taipy/core/_core.py

@@ -61,8 +61,8 @@ class Core:
             self.__class__._is_running = True
 
         self._manage_version_and_block_config()
-        self.__logger.info("Core service started.")
         self.__start_dispatcher(force_restart)
+        self.__logger.info("Core service has been started.")
 
     def stop(self, wait: bool = True, timeout: Optional[float] = None):
         """
@@ -73,18 +73,17 @@ class Core:
             wait (bool): If True, the method will wait for the dispatcher to stop.
             timeout (Optional[float]): The maximum time to wait. If None, the method will wait indefinitely.
         """
-        self.__logger.info("Unblocking configuration update.")
+        self.__logger.info("Unblocking configuration update...")
         Config.unblock_update()
 
+        self.__logger.info("Stopping job dispatcher...")
         if self._dispatcher:
             self._dispatcher = _OrchestratorFactory._remove_dispatcher(wait, timeout)
-            self.__logger.info("Core service has been stopped.")
-
         with self.__class__.__lock_is_running:
             self.__class__._is_running = False
-
         with self.__class__.__lock_version_is_initialized:
             self.__class__._version_is_initialized = False
+        self.__logger.info("Core service has been stopped.")
 
     @classmethod
     def _manage_version_and_block_config(cls):
@@ -103,11 +102,13 @@ class Core:
 
     @classmethod
     def __update_core_section(cls):
+        cls.__logger.info("Updating configuration with command-line arguments...")
         _CoreCLI.create_parser()
         Config._applied_config._unique_sections[CoreSection.name]._update(_CoreCLI.parse_arguments())
 
     @classmethod
     def __manage_version(cls):
+        cls.__logger.info("Managing application's version...")
         _VersionManagerFactory._build_manager()._manage_version()
         Config._applied_config._unique_sections[CoreSection.name]._update(
             {"version_number": _VersionManagerFactory._build_manager()._get_latest_version()}
@@ -115,12 +116,14 @@ class Core:
 
     @classmethod
     def __check_and_block_config(cls):
+        cls.__logger.info("Checking application's version...")
         Config.check()
-        cls.__logger.info("Blocking configuration update.")
+        cls.__logger.info("Blocking configuration update...")
         Config.block_update()
         _init_backup_file_with_storage_folder()
 
     def __start_dispatcher(self, force_restart):
+        self.__logger.info("Starting job dispatcher...")
         if self._orchestrator is None:
             self._orchestrator = _OrchestratorFactory._build_orchestrator()