mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 03:54:58 -04:00
Don't hammer the database for destination retry timings every ~5mins (#10036)
This commit is contained in:
parent
e8ac9ac8ca
commit
3e831f24ff
10 changed files with 62 additions and 76 deletions
|
@ -12,6 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from synapse.storage.databases.main.transactions import DestinationRetryTimings
|
||||
from synapse.util.retryutils import MAX_RETRY_INTERVAL
|
||||
|
||||
from tests.unittest import HomeserverTestCase
|
||||
|
@ -36,8 +37,11 @@ class TransactionStoreTestCase(HomeserverTestCase):
|
|||
d = self.store.get_destination_retry_timings("example.com")
|
||||
r = self.get_success(d)
|
||||
|
||||
self.assert_dict(
|
||||
{"retry_last_ts": 50, "retry_interval": 100, "failure_ts": 1000}, r
|
||||
self.assertEqual(
|
||||
DestinationRetryTimings(
|
||||
retry_last_ts=50, retry_interval=100, failure_ts=1000
|
||||
),
|
||||
r,
|
||||
)
|
||||
|
||||
def test_initial_set_transactions(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue