mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 01:54:48 -04:00
Move update_client_ip
background job from the main process to the background worker. (#12251)
This commit is contained in:
parent
319a805cd3
commit
f871222880
10 changed files with 159 additions and 152 deletions
|
@ -356,7 +356,7 @@ class UserIpCommand(Command):
|
|||
access_token: str,
|
||||
ip: str,
|
||||
user_agent: str,
|
||||
device_id: str,
|
||||
device_id: Optional[str],
|
||||
last_seen: int,
|
||||
):
|
||||
self.user_id = user_id
|
||||
|
@ -389,6 +389,12 @@ class UserIpCommand(Command):
|
|||
)
|
||||
)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return (
|
||||
f"UserIpCommand({self.user_id!r}, .., {self.ip!r}, "
|
||||
f"{self.user_agent!r}, {self.device_id!r}, {self.last_seen})"
|
||||
)
|
||||
|
||||
|
||||
class RemoteServerUpCommand(_SimpleCommand):
|
||||
"""Sent when a worker has detected that a remote server is no longer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue