Fix lack of PostgresEngine imported

This commit is contained in:
Erik Johnston 2024-05-29 13:55:45 +01:00
parent 484845524f
commit e4550d4c64

View file

@ -2279,9 +2279,8 @@ class EventsWorkerStore(SQLBaseStore):
""" """
def get_event_id_for_timestamp_txn(txn: LoggingTransaction) -> Optional[str]: def get_event_id_for_timestamp_txn(txn: LoggingTransaction) -> Optional[str]:
if isinstance(self.database_engine, PostgresEngine): # Temporary: make sure these queries can't last more than 30s
# Temporary: make sure these queries can't last more than 30s txn.execute("SET LOCAL statement_timeout = 30000")
txn.execute("SET LOCAL statement_timeout = 30000")
txn.execute( txn.execute(
sql_template, sql_template,