Skip to content

Commit

Permalink
fix: Disable active_timer When registry_ttl_sec is 0 (feast-dev#4499)
Browse files Browse the repository at this point in the history
* fix: Disable active_timer When registry_ttl_sec is 0

Signed-off-by: Jiwon Park <[email protected]>

* feat: Add delete mark

Signed-off-by: Jiwon Park <[email protected]>

---------

Signed-off-by: Jiwon Park <[email protected]>
  • Loading branch information
phil-park authored Sep 9, 2024
1 parent 7ecc615 commit c94f32f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sdk/python/feast/feature_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c94f32f

Please sign in to comment.