diff options
author | Erik Johnston <erik@matrix.org> | 2021-05-21 17:57:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 17:57:08 +0100 |
commit | 3e831f24ffc887e174f67ff7b1cfe3a429b7b5c1 (patch) | |
tree | ef58fff9a3c71f57b995790b3e36e6c84fff83f1 /synapse/util | |
parent | Fix /upload 500'ing when presented a very large image (#10029) (diff) | |
download | synapse-3e831f24ffc887e174f67ff7b1cfe3a429b7b5c1.tar.xz |
Don't hammer the database for destination retry timings every ~5mins (#10036)
Diffstat (limited to 'synapse/util')
-rw-r--r-- | synapse/util/retryutils.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/util/retryutils.py b/synapse/util/retryutils.py index f9c370a814..129b47cd49 100644 --- a/synapse/util/retryutils.py +++ b/synapse/util/retryutils.py @@ -82,11 +82,9 @@ async def get_retry_limiter(destination, clock, store, ignore_backoff=False, **k retry_timings = await store.get_destination_retry_timings(destination) if retry_timings: - failure_ts = retry_timings["failure_ts"] - retry_last_ts, retry_interval = ( - retry_timings["retry_last_ts"], - retry_timings["retry_interval"], - ) + failure_ts = retry_timings.failure_ts + retry_last_ts = retry_timings.retry_last_ts + retry_interval = retry_timings.retry_interval now = int(clock.time_msec()) |