Fix chain cover background update to work with split out event persisters (#9115)

This commit is contained in:
Erik Johnston 2021-01-14 17:19:35 +00:00 committed by GitHub
parent 631dd06f2c
commit 659c415ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 29 deletions

View file

@ -15,9 +15,8 @@
import abc
import logging
import threading
from typing import Callable, List, Optional
from typing import TYPE_CHECKING, Callable, List, Optional
from synapse.storage.database import LoggingDatabaseConnection
from synapse.storage.engines import (
BaseDatabaseEngine,
IncorrectDatabaseSetup,
@ -25,6 +24,9 @@ from synapse.storage.engines import (
)
from synapse.storage.types import Connection, Cursor
if TYPE_CHECKING:
from synapse.storage.database import LoggingDatabaseConnection
logger = logging.getLogger(__name__)
@ -55,7 +57,7 @@ class SequenceGenerator(metaclass=abc.ABCMeta):
@abc.abstractmethod
def check_consistency(
self,
db_conn: LoggingDatabaseConnection,
db_conn: "LoggingDatabaseConnection",
table: str,
id_column: str,
positive: bool = True,
@ -88,7 +90,7 @@ class PostgresSequenceGenerator(SequenceGenerator):
def check_consistency(
self,
db_conn: LoggingDatabaseConnection,
db_conn: "LoggingDatabaseConnection",
table: str,
id_column: str,
positive: bool = True,