From c94f32f2b637c7b7d917d2456432180af7569cf5 Mon Sep 17 00:00:00 2001 From: Jiwon Park Date: Mon, 9 Sep 2024 18:24:52 +0900 Subject: [PATCH] fix: Disable active_timer When registry_ttl_sec is 0 (#4499) * fix: Disable active_timer When registry_ttl_sec is 0 Signed-off-by: Jiwon Park * feat: Add delete mark Signed-off-by: Jiwon Park --------- Signed-off-by: Jiwon Park --- sdk/python/feast/feature_server.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk/python/feast/feature_server.py b/sdk/python/feast/feature_server.py index 4f8de1eef5..9757e95143 100644 --- a/sdk/python/feast/feature_server.py +++ b/sdk/python/feast/feature_server.py @@ -90,9 +90,11 @@ def async_refresh(): registry_proto = store.registry.proto() if shutting_down: return - nonlocal active_timer - active_timer = threading.Timer(registry_ttl_sec, async_refresh) - active_timer.start() + + if registry_ttl_sec: + nonlocal active_timer + active_timer = threading.Timer(registry_ttl_sec, async_refresh) + active_timer.start() @asynccontextmanager async def lifespan(app: FastAPI):