Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163714
D2301.id7919.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
861 B
Subscribers
None
D2301.id7919.diff
View Options
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
Details
Attached
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
Attached To
D2301: Ensure BufferedLoader and UnbufferedLoader do flush their storage
Event Timeline
Log In to Comment