mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:56:02 -04:00
Pass around the reactor explicitly (#3385)
This commit is contained in:
parent
c2eff937ac
commit
77ac14b960
25 changed files with 141 additions and 93 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
import logging
|
||||
|
||||
from twisted.internet import defer, reactor
|
||||
from twisted.internet import defer
|
||||
|
||||
from ._base import Cache
|
||||
from . import background_updates
|
||||
|
@ -70,7 +70,9 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
|
|||
self._client_ip_looper = self._clock.looping_call(
|
||||
self._update_client_ips_batch, 5 * 1000
|
||||
)
|
||||
reactor.addSystemEventTrigger("before", "shutdown", self._update_client_ips_batch)
|
||||
self.hs.get_reactor().addSystemEventTrigger(
|
||||
"before", "shutdown", self._update_client_ips_batch
|
||||
)
|
||||
|
||||
def insert_client_ip(self, user_id, access_token, ip, user_agent, device_id,
|
||||
now=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue