Skip to content

Commit a66b1db

Browse files
committed
flush when exporting to reader
1 parent f532486 commit a66b1db

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/valor_lite/common/ephemeral.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
192192

193193
def to_reader(self) -> MemoryCacheReader:
194194
"""Get cache reader."""
195+
self.flush()
195196
return MemoryCacheReader(
196197
table=self._table, batch_size=self._batch_size
197198
)

src/valor_lite/common/persistent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,4 +425,5 @@ def __exit__(self, exc_type, exc_val, exc_tb):
425425

426426
def to_reader(self) -> FileCacheReader:
427427
"""Get cache reader."""
428+
self.flush()
428429
return FileCacheReader.load(path=self.path)

0 commit comments

Comments
 (0)