Skip to content

Commit

Permalink
feat: Cache Bigtable client (feast-dev#3602)
Browse files Browse the repository at this point in the history
* Cache Bigtable client

Signed-off-by: Yusuke Nishioka <yusuke.nishioka.0713@gmail.com>

* Run format

Signed-off-by: Yusuke Nishioka <yusuke.nishioka.0713@gmail.com>

---------

Signed-off-by: Yusuke Nishioka <yusuke.nishioka.0713@gmail.com>
Signed-off-by: zerafachris PERSONAL <zerafachris@gmail.com>
  • Loading branch information
ysk24ok authored and zerafachris committed Mar 5, 2024
1 parent b711cab commit 0d6a060
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdk/python/feast/infra/online_stores/bigtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,8 @@ def teardown(
def _get_client(
self, online_config: BigtableOnlineStoreConfig, admin: bool = False
):
return bigtable.Client(project=online_config.project_id, admin=admin)
if self._client is None:
self._client = bigtable.Client(
project=online_config.project_id, admin=admin
)
return self._client

0 comments on commit 0d6a060

Please sign in to comment.