Skip to content

Commit c94f32f

Browse files
authored
fix: Disable active_timer When registry_ttl_sec is 0 (feast-dev#4499)
* fix: Disable active_timer When registry_ttl_sec is 0 Signed-off-by: Jiwon Park <phil.park@sktelecom.com> * feat: Add delete mark Signed-off-by: Jiwon Park <phil.park@sktelecom.com> --------- Signed-off-by: Jiwon Park <phil.park@sktelecom.com>
1 parent 7ecc615 commit c94f32f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sdk/python/feast/feature_server.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ def async_refresh():
9090
registry_proto = store.registry.proto()
9191
if shutting_down:
9292
return
93-
nonlocal active_timer
94-
active_timer = threading.Timer(registry_ttl_sec, async_refresh)
95-
active_timer.start()
93+
94+
if registry_ttl_sec:
95+
nonlocal active_timer
96+
active_timer = threading.Timer(registry_ttl_sec, async_refresh)
97+
active_timer.start()
9698

9799
@asynccontextmanager
98100
async def lifespan(app: FastAPI):

0 commit comments

Comments
 (0)