Skip to content
Snippets Groups Projects
Unverified Commit f1711e1f authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Remove delay when rotating event push actions (#13211)

We want to be as up to date as possible, and sleeping doesn't help here
and can mean we fall behind.
parent 5ef2f875
No related branches found
No related tags found
No related merge requests found
More aggressively rotate push actions.
...@@ -143,7 +143,6 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas ...@@ -143,7 +143,6 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas
self._find_stream_orderings_for_times, 10 * 60 * 1000 self._find_stream_orderings_for_times, 10 * 60 * 1000
) )
self._rotate_delay = 3
self._rotate_count = 10000 self._rotate_count = 10000
self._doing_notif_rotation = False self._doing_notif_rotation = False
if hs.config.worker.run_background_tasks: if hs.config.worker.run_background_tasks:
...@@ -847,7 +846,6 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas ...@@ -847,7 +846,6 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas
) )
if caught_up: if caught_up:
break break
await self.hs.get_clock().sleep(self._rotate_delay)
# Finally we clear out old event push actions. # Finally we clear out old event push actions.
await self._remove_old_push_actions_that_have_rotated() await self._remove_old_push_actions_that_have_rotated()
...@@ -1114,7 +1112,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas ...@@ -1114,7 +1112,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas
) -> bool: ) -> bool:
# We don't want to clear out too much at a time, so we bound our # We don't want to clear out too much at a time, so we bound our
# deletes. # deletes.
batch_size = 10000 batch_size = self._rotate_count
txn.execute( txn.execute(
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment