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>
  • Loading branch information
ysk24ok committed Apr 21, 2023
1 parent 58d63f7 commit b27472f
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 b27472f

Please sign in to comment.