File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
sdk/python/feast/infra/online_stores Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -89,15 +89,15 @@ class RedisOnlineStore(OnlineStore):
8989 def delete_entity_values (self , config : RepoConfig , join_keys : List [str ]):
9090 client = self ._get_client (config .online_store )
9191 deleted_count = 0
92- pipeline = client .pipeline (transaction = False )
9392 prefix = _redis_key_prefix (join_keys )
9493
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 ()
101101
102102 logger .debug (f"Deleted { deleted_count } rows for entity { ', ' .join (join_keys )} " )
103103
You can’t perform that action at this time.
0 commit comments