mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-06 16:55:18 -04:00
Fix chain cover background update to work with split out event persisters (#9115)
This commit is contained in:
parent
631dd06f2c
commit
659c415ed4
5 changed files with 38 additions and 29 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue