From 3a9c1e836e50b86f60a9c2174706b51d29b2baff Mon Sep 17 00:00:00 2001 From: martinRenou Date: Wed, 2 Aug 2023 15:05:51 +0200 Subject: [PATCH] More debug msg --- voila/app.py | 2 +- voila/utils.py | 1 + voila/voila_kernel_manager.py | 9 ++++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/voila/app.py b/voila/app.py index ef458fffb..647128ff9 100644 --- a/voila/app.py +++ b/voila/app.py @@ -552,7 +552,7 @@ def init_settings(self) -> Dict: if preheat_kernel and self.prelaunch_hook: raise Exception("`preheat_kernel` and `prelaunch_hook` are incompatible") - print('--- DEBUG preheat', preheat_kernel) + print("--- DEBUG preheat", preheat_kernel) kernel_manager_class = voila_kernel_manager_factory( self.voila_configuration.multi_kernel_manager_class, diff --git a/voila/utils.py b/voila/utils.py index 8115e14be..ee1fc7a9a 100644 --- a/voila/utils.py +++ b/voila/utils.py @@ -203,6 +203,7 @@ def wait_for_request(url: str = None) -> str: ws_base_url = os.getenv(ENV_VARIABLE.VOILA_WS_BASE_URL, server_url) url = f"{protocol}://{server_ip}:{server_port}{ws_base_url}voila/query" + print("-- DEBUG kernel_id", kernel_id) kernel_id = os.getenv(ENV_VARIABLE.VOILA_KERNEL_ID) ws_url = f"{url}/{kernel_id}" diff --git a/voila/voila_kernel_manager.py b/voila/voila_kernel_manager.py index 2a8b9636d..547edeb6e 100644 --- a/voila/voila_kernel_manager.py +++ b/voila/voila_kernel_manager.py @@ -53,8 +53,8 @@ def voila_kernel_manager_factory( T: Decorated class """ if not preheat_kernel: + print("--- DEBUG created NON preheat manager") - print('--- DEBUG created NON preheat manager') class NormalKernelManager(base_class): @property def notebook_data(self) -> TypeDict: @@ -66,8 +66,7 @@ def get_pool_size(self, nb: str) -> int: return NormalKernelManager else: - - print('--- DEBUG created preheat manager') + print("--- DEBUG created preheat manager") class VoilaKernelManager(base_class): """This class adds pooling heated kernels and pre-rendered notebook @@ -243,8 +242,8 @@ def fill_if_needed( kwargs["env"] = kernel_env heated = len(pool) - print('--- DEBUG pool of', heated) - print('--- DEBUG kernel size', kernel_size) + print("--- DEBUG pool of", heated) + print("--- DEBUG kernel size", kernel_size) def task_counter(tk): nonlocal heated