Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/storage.py
Show First 20 Lines • Show All 893 Lines • ▼ Show 20 Lines | class Storage: | ||||
def _origin_visit_apply_update( | def _origin_visit_apply_update( | ||||
self, visit: Dict[str, Any], db, cur=None | self, visit: Dict[str, Any], db, cur=None | ||||
) -> Dict[str, Any]: | ) -> Dict[str, Any]: | ||||
"""Retrieve the latest visit status information for the origin visit. | """Retrieve the latest visit status information for the origin visit. | ||||
Then merge it with the visit and return it. | Then merge it with the visit and return it. | ||||
""" | """ | ||||
visit_status = db.origin_visit_status_get_latest( | visit_status = db.origin_visit_status_get_latest( | ||||
visit["origin"], visit["visit"] | visit["origin"], visit["visit"], cur=cur | ||||
) | ) | ||||
return self._origin_visit_merge(visit, visit_status) | return self._origin_visit_merge(visit, visit_status) | ||||
def _origin_visit_merge( | def _origin_visit_merge( | ||||
self, visit: Dict[str, Any], visit_status: Dict[str, Any] | self, visit: Dict[str, Any], visit_status: Dict[str, Any] | ||||
) -> Dict[str, Any]: | ) -> Dict[str, Any]: | ||||
"""Merge origin_visit and origin_visit_status together. | """Merge origin_visit and origin_visit_status together. | ||||
▲ Show 20 Lines • Show All 400 Lines • Show Last 20 Lines |