Save root object after the children are saved to local transport

This commit is contained in:
cristi8
2021-05-17 13:37:31 +03:00
parent a016ed9201
commit 6abeafdd9e
+2 -2
View File
@@ -76,8 +76,6 @@ class ServerTransport(AbstractTransport):
root_obj = json.loads(root_obj_serialized)
closures = root_obj.get('__closure', {})
target_transport.save_object(id, root_obj_serialized)
# Check which children are not already in the target transport
children_ids = list(closures.keys())
children_found_map = target_transport.has_objects(children_ids)
@@ -96,6 +94,8 @@ class ServerTransport(AbstractTransport):
hash, obj = line.split("\t")
target_transport.save_object(hash, obj)
target_transport.save_object(id, root_obj_serialized)
return root_obj
# async def stream_res(self, endpoint: str) -> str: