Save root object after the children are saved to local transport
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user