mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-08 05:42:37 -04:00
Require SQLite >= 3.27.0 (#13760)
This commit is contained in:
parent
69fa29700e
commit
f2d2481e56
9 changed files with 103 additions and 205 deletions
|
@ -221,25 +221,15 @@ class TransactionWorkerStore(CacheInvalidationWorkerStore):
|
|||
retry_interval: how long until next retry in ms
|
||||
"""
|
||||
|
||||
if self.database_engine.can_native_upsert:
|
||||
await self.db_pool.runInteraction(
|
||||
"set_destination_retry_timings",
|
||||
self._set_destination_retry_timings_native,
|
||||
destination,
|
||||
failure_ts,
|
||||
retry_last_ts,
|
||||
retry_interval,
|
||||
db_autocommit=True, # Safe as its a single upsert
|
||||
)
|
||||
else:
|
||||
await self.db_pool.runInteraction(
|
||||
"set_destination_retry_timings",
|
||||
self._set_destination_retry_timings_emulated,
|
||||
destination,
|
||||
failure_ts,
|
||||
retry_last_ts,
|
||||
retry_interval,
|
||||
)
|
||||
await self.db_pool.runInteraction(
|
||||
"set_destination_retry_timings",
|
||||
self._set_destination_retry_timings_native,
|
||||
destination,
|
||||
failure_ts,
|
||||
retry_last_ts,
|
||||
retry_interval,
|
||||
db_autocommit=True, # Safe as it's a single upsert
|
||||
)
|
||||
|
||||
def _set_destination_retry_timings_native(
|
||||
self,
|
||||
|
@ -249,8 +239,6 @@ class TransactionWorkerStore(CacheInvalidationWorkerStore):
|
|||
retry_last_ts: int,
|
||||
retry_interval: int,
|
||||
) -> None:
|
||||
assert self.database_engine.can_native_upsert
|
||||
|
||||
# Upsert retry time interval if retry_interval is zero (i.e. we're
|
||||
# resetting it) or greater than the existing retry interval.
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue