mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:06:05 -04:00
Mark AS users with their AS's ID
This commit is contained in:
parent
7718303e71
commit
763360594d
10 changed files with 121 additions and 36 deletions
|
@ -21,9 +21,10 @@ from ._base import IncorrectDatabaseSetup
|
|||
class PostgresEngine(object):
|
||||
single_threaded = False
|
||||
|
||||
def __init__(self, database_module):
|
||||
def __init__(self, database_module, config):
|
||||
self.module = database_module
|
||||
self.module.extensions.register_type(self.module.extensions.UNICODE)
|
||||
self.config = config
|
||||
|
||||
def check_database(self, txn):
|
||||
txn.execute("SHOW SERVER_ENCODING")
|
||||
|
@ -44,7 +45,7 @@ class PostgresEngine(object):
|
|||
)
|
||||
|
||||
def prepare_database(self, db_conn):
|
||||
prepare_database(db_conn, self)
|
||||
prepare_database(db_conn, self, config=self.config)
|
||||
|
||||
def is_deadlock(self, error):
|
||||
if isinstance(error, self.module.DatabaseError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue