GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Manage redis pipe's context (#3655) · ExpediaGroup/feast@48e0971

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • sdk/python/feast/infra/online_stores
    • redis.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎sdk/python/feast/infra/online_stores/redis.py‎

Copy file name to clipboardExpand all lines: sdk/python/feast/infra/online_stores/redis.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.