Commit 48e0971 1 parent 4861af0 commit 48e0971 Copy full SHA for 48e0971
File tree 1 file changed +7
-7
lines changed
sdk/python/feast/infra/online_stores
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -89,15 +89,15 @@ class RedisOnlineStore(OnlineStore):
89
89
def delete_entity_values (self , config : RepoConfig , join_keys : List [str ]):
90
90
client = self ._get_client (config .online_store )
91
91
deleted_count = 0
92
- pipeline = client .pipeline (transaction = False )
93
92
prefix = _redis_key_prefix (join_keys )
94
93
95
- for _k in client .scan_iter (
96
- b"" .join ([prefix , b"*" , config .project .encode ("utf8" )])
97
- ):
98
- pipeline .delete (_k )
99
- deleted_count += 1
100
- pipeline .execute ()
94
+ with client .pipeline (transaction = False ) as pipe :
95
+ for _k in client .scan_iter (
96
+ b"" .join ([prefix , b"*" , config .project .encode ("utf8" )])
97
+ ):
98
+ pipe .delete (_k )
99
+ deleted_count += 1
100
+ pipe .execute ()
101
101
102
102
logger .debug (f"Deleted { deleted_count } rows for entity { ', ' .join (join_keys )} " )
103
103
You can’t perform that action at this time.
0 commit comments