Changeset View
Changeset View
Standalone View
Standalone View
swh/vault/cookers/base.py
# Copyright (C) 2016-2018 The Software Heritage developers | # Copyright (C) 2016-2018 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import abc | import abc | ||||
import io | import io | ||||
import logging | import logging | ||||
import traceback | import traceback | ||||
from typing import ClassVar, Set | from typing import ClassVar, Set | ||||
from psycopg2.extensions import QueryCanceledError | from psycopg2.extensions import QueryCanceledError | ||||
from swh.model.identifiers import CoreSWHID, ObjectType | from swh.model.swhids import CoreSWHID, ObjectType | ||||
from swh.storage.interface import StorageInterface | from swh.storage.interface import StorageInterface | ||||
MAX_BUNDLE_SIZE = 2 ** 29 # 512 MiB | MAX_BUNDLE_SIZE = 2 ** 29 # 512 MiB | ||||
DEFAULT_CONFIG_PATH = "vault/cooker" | DEFAULT_CONFIG_PATH = "vault/cooker" | ||||
DEFAULT_CONFIG = { | DEFAULT_CONFIG = { | ||||
"max_bundle_size": ("int", MAX_BUNDLE_SIZE), | "max_bundle_size": ("int", MAX_BUNDLE_SIZE), | ||||
} | } | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |