Page MenuHomeSoftware Heritage

D2301.id7919.diff
No OneTemporary

D2301.id7919.diff

diff --git a/swh/loader/core/loader.py b/swh/loader/core/loader.py
--- a/swh/loader/core/loader.py
+++ b/swh/loader/core/loader.py
@@ -691,6 +691,8 @@
self.send_batch_releases(releases)
if self.config['send_snapshot'] and self.snapshot:
self.send_snapshot(self.snapshot)
+ if hasattr(self.storage, 'flush'):
+ self.storage.flush()
def prepare_metadata(self):
"""First step for origin_metadata insertion, resolving the
@@ -956,10 +958,10 @@
raise NotImplementedError
def flush(self):
- """Unbuffered loader does not flush since it has no state to flush.
-
+ """Flush the storage if needed.
"""
- pass
+ if hasattr(self.storage, 'flush'):
+ self.storage.flush()
def store_data(self):
if self.config['save_data']:

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 1:52 PM (8 h, 18 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219997

Event Timeline