From 0a037285ea3e55228bb0a4165a1f52d3f107b606 Mon Sep 17 00:00:00 2001 From: Geoffrey Yu Date: Sat, 30 Mar 2024 18:01:38 +0000 Subject: [PATCH] Fix bug in stub mode detection --- src/brad/front_end/front_end.py | 2 +- src/brad/front_end/session.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/brad/front_end/front_end.py b/src/brad/front_end/front_end.py index d00b47e0..90b4a0ce 100644 --- a/src/brad/front_end/front_end.py +++ b/src/brad/front_end/front_end.py @@ -188,7 +188,7 @@ def __init__( ) self._ping_watchdog_task: Optional[asyncio.Task[None]] = None - self._is_stub_mode = self._config.stub_mode_path is not None + self._is_stub_mode = self._config.stub_mode_path() is not None async def serve_forever(self): await self._run_setup() diff --git a/src/brad/front_end/session.py b/src/brad/front_end/session.py index c0e89e90..376d7292 100644 --- a/src/brad/front_end/session.py +++ b/src/brad/front_end/session.py @@ -116,7 +116,7 @@ async def create_new_session(self) -> Tuple[SessionId, Session]: routing_policy_override == RoutingPolicy.ForestTableSelectivity or routing_policy_override == RoutingPolicy.Default ): - if self._config.stub_mode_path is None: + if self._config.stub_mode_path() is not None: estimator = await PostgresEstimator.connect( self._schema_name, self._config )