Skip to content

Commit 02333be

Browse files
Copilotgkorland
andcommitted
Fix refresh_graph_schema to properly consume async generator
Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
1 parent 1f4851c commit 02333be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/loaders/snowflake_loader.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,10 @@ async def refresh_graph_schema(graph_id: str, db_url: str) -> Tuple[bool, str]:
527527
prefix = graph_id
528528

529529
# Reuse the existing load method to reload the schema
530-
success, message = await SnowflakeLoader.load(prefix, db_url)
530+
success = False
531+
message = ""
532+
async for progress_tuple in SnowflakeLoader.load(prefix, db_url):
533+
success, message = progress_tuple
531534

532535
if success:
533536
logging.info("Graph schema refreshed successfully.")

0 commit comments

Comments
 (0)