Ensure that the background tasks have access to the proper stores.
parent
b77b89b044
commit
f26b92eec7
|
@ -133,6 +133,7 @@ from synapse.storage.databases.main.monthly_active_users import (
|
||||||
)
|
)
|
||||||
from synapse.storage.databases.main.presence import UserPresenceState
|
from synapse.storage.databases.main.presence import UserPresenceState
|
||||||
from synapse.storage.databases.main.search import SearchWorkerStore
|
from synapse.storage.databases.main.search import SearchWorkerStore
|
||||||
|
from synapse.storage.databases.main.stats import StatsStore
|
||||||
from synapse.storage.databases.main.ui_auth import UIAuthWorkerStore
|
from synapse.storage.databases.main.ui_auth import UIAuthWorkerStore
|
||||||
from synapse.storage.databases.main.user_directory import UserDirectoryStore
|
from synapse.storage.databases.main.user_directory import UserDirectoryStore
|
||||||
from synapse.types import ReadReceipt
|
from synapse.types import ReadReceipt
|
||||||
|
@ -454,6 +455,7 @@ class GenericWorkerSlavedStore(
|
||||||
# FIXME(#3714): We need to add UserDirectoryStore as we write directly
|
# FIXME(#3714): We need to add UserDirectoryStore as we write directly
|
||||||
# rather than going via the correct worker.
|
# rather than going via the correct worker.
|
||||||
UserDirectoryStore,
|
UserDirectoryStore,
|
||||||
|
StatsStore,
|
||||||
UIAuthWorkerStore,
|
UIAuthWorkerStore,
|
||||||
SlavedDeviceInboxStore,
|
SlavedDeviceInboxStore,
|
||||||
SlavedDeviceStore,
|
SlavedDeviceStore,
|
||||||
|
|
|
@ -288,8 +288,6 @@ class UIAuthWorkerStore(SQLBaseStore):
|
||||||
)
|
)
|
||||||
return [(row["user_agent"], row["ip"]) for row in rows]
|
return [(row["user_agent"], row["ip"]) for row in rows]
|
||||||
|
|
||||||
|
|
||||||
class UIAuthStore(UIAuthWorkerStore):
|
|
||||||
async def delete_old_ui_auth_sessions(self, expiration_time: int) -> None:
|
async def delete_old_ui_auth_sessions(self, expiration_time: int) -> None:
|
||||||
"""
|
"""
|
||||||
Remove sessions which were last used earlier than the expiration time.
|
Remove sessions which were last used earlier than the expiration time.
|
||||||
|
@ -339,3 +337,7 @@ class UIAuthStore(UIAuthWorkerStore):
|
||||||
iterable=session_ids,
|
iterable=session_ids,
|
||||||
keyvalues={},
|
keyvalues={},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class UIAuthStore(UIAuthWorkerStore):
|
||||||
|
pass
|
||||||
|
|
Loading…
Reference in New Issue