Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/storage/__init__.py
# Copyright (C) 2015-2020 The Software Heritage developers | # Copyright (C) 2015-2020 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 json | import json | ||||
import psycopg2 | import psycopg2 | ||||
import psycopg2.pool | import psycopg2.pool | ||||
from collections import defaultdict, Counter | from collections import defaultdict, Counter | ||||
from typing import Dict, List, Optional | from typing import Dict, List, Optional | ||||
from swh.core.db.common import db_transaction_generator, db_transaction | |||||
from swh.model.hashutil import hash_to_bytes, hash_to_hex | from swh.model.hashutil import hash_to_bytes, hash_to_hex | ||||
from swh.model.model import SHA1_SIZE | from swh.model.model import SHA1_SIZE | ||||
from swh.storage.common import db_transaction_generator, db_transaction | |||||
from swh.storage.exc import StorageDBError | from swh.storage.exc import StorageDBError | ||||
from swh.storage.utils import get_partition_bounds_bytes | from swh.storage.utils import get_partition_bounds_bytes | ||||
from .interface import PagedResult, Sha1 | from .interface import PagedResult, Sha1 | ||||
from . import converters | from . import converters | ||||
from .db import Db | from .db import Db | ||||
from .exc import IndexerStorageArgumentException, DuplicateId | from .exc import IndexerStorageArgumentException, DuplicateId | ||||
▲ Show 20 Lines • Show All 625 Lines • Show Last 20 Lines |