Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/replay.py
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | for (object_type, objects) in all_objects.items(): | ||||
statsd.increment( | statsd.increment( | ||||
GRAPH_OPERATIONS_METRIC, len(objects), tags={"object_type": object_type} | GRAPH_OPERATIONS_METRIC, len(objects), tags={"object_type": object_type} | ||||
) | ) | ||||
if notify: | if notify: | ||||
notify("WATCHDOG=1") | notify("WATCHDOG=1") | ||||
def collision_aware_content_add( | def collision_aware_content_add( | ||||
content_add_fn: Callable[[Iterable[Any]], None], contents: List[BaseContent] | content_add_fn: Callable[[Iterable[Any]], Dict[str, int]], | ||||
contents: List[BaseContent], | |||||
) -> None: | ) -> None: | ||||
"""Add contents to storage. If a hash collision is detected, an error is | """Add contents to storage. If a hash collision is detected, an error is | ||||
logged. Then this adds the other non colliding contents to the storage. | logged. Then this adds the other non colliding contents to the storage. | ||||
Args: | Args: | ||||
content_add_fn: Storage content callable | content_add_fn: Storage content callable | ||||
contents: List of contents or skipped contents to add to storage | contents: List of contents or skipped contents to add to storage | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |