From eade628646eb1f5deca1defa836e768d1939f82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 11 Oct 2024 15:28:13 +0200 Subject: [PATCH] feat: improve exception printing --- src/code_interpreter/services/kubectl.py | 2 +- src/code_interpreter/services/kubernetes_code_executor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/code_interpreter/services/kubectl.py b/src/code_interpreter/services/kubectl.py index 23e1213..b27cecf 100644 --- a/src/code_interpreter/services/kubectl.py +++ b/src/code_interpreter/services/kubectl.py @@ -66,7 +66,7 @@ async def _spawn_process( ] + list(args[dashdash_position:]) ) - logger.info(f"kubectl {shlex.join(all_args)}") + logger.info("kubectl %s", shlex.join(all_args)) return await asyncio.create_subprocess_exec( "kubectl", *all_args, diff --git a/src/code_interpreter/services/kubernetes_code_executor.py b/src/code_interpreter/services/kubernetes_code_executor.py index a64a207..b512659 100644 --- a/src/code_interpreter/services/kubernetes_code_executor.py +++ b/src/code_interpreter/services/kubernetes_code_executor.py @@ -180,7 +180,7 @@ async def fill_executor_pod_queue(self): self.executor_pod_queue.append(await pod_spawn_task) spawned_pods += 1 except Exception as e: - logger.error(f"Failed to spawn executor pod: {e}") + logger.error("Failed to spawn executor pod:", e) finally: self.executor_pod_queue_spawning_count -= 1 logger.info(