Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sdk/python/feast/infra/registry/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ def __init__(
repo_path: Optional[Path],
):
assert registry_config is not None, "SqlRegistry needs a valid registry_config"
self.engine: Engine = create_engine(registry_config.path, echo=False)
# pool_recycle will recycle connections after the given number of seconds has passed
# This is to avoid automatic disconnections when no activity is detected on connection
self.engine: Engine = create_engine(
registry_config.path, echo=False, pool_recycle=3600
)
metadata.create_all(self.engine)
self.cached_registry_proto = self.proto()
proto_registry_utils.init_project_metadata(self.cached_registry_proto, project)
Expand Down