From bf63f9156791c00aa5255742dea9996f858dc775 Mon Sep 17 00:00:00 2001 From: TheDude Date: Tue, 31 Dec 2024 13:10:57 +0530 Subject: [PATCH] Fix db wait logic --- CHANGELOG.md | 1 + superduper/base/apply.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56e9e58a0..59ff120c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fallback for ibis drop table - Add create events waiting on db apply. - Refactor secrets loading method. +- Add db.load in db wait #### New Features & Functionality diff --git a/superduper/base/apply.py b/superduper/base/apply.py index 451fcede5..b3550a154 100644 --- a/superduper/base/apply.py +++ b/superduper/base/apply.py @@ -132,15 +132,15 @@ def apply( def _wait_on_events(db, events): - remaining = len(events) time_left = _WAIT_TIMEOUT while True: + remaining = len(events) for event in events: identifier = event.component['identifier'] type_id = event.component['type_id'] version = event.component['version'] try: - db.show(type_id=type_id, identifier=identifier, version=version) + db.load(type_id=type_id, identifier=identifier, version=version) except FileNotFoundError: pass else: