mirror of
https://github.com/element-hq/synapse.git
synced 2026-01-16 23:00:43 +00:00
Linting
This commit is contained in:
parent
b1af5fece6
commit
f0689cee5e
2 changed files with 3 additions and 6 deletions
|
|
@ -518,9 +518,8 @@ class FederationSender(AbstractFederationSender):
|
|||
if not self.hs.config.experimental.msc4354_enabled:
|
||||
return
|
||||
# fire off a processing loop in the background
|
||||
run_as_background_process(
|
||||
self.hs.run_as_background_process(
|
||||
"process_new_server_joined_over_federation",
|
||||
self.server_name,
|
||||
self._process_new_server_joined_over_federation,
|
||||
server,
|
||||
room_id,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ from synapse.api.constants import EventTypes, StickyEvent
|
|||
from synapse.api.errors import AuthError
|
||||
from synapse.events import EventBase
|
||||
from synapse.events.snapshot import EventPersistencePair
|
||||
from synapse.metrics.background_process_metrics import run_as_background_process
|
||||
from synapse.replication.tcp.streams._base import StickyEventsStream
|
||||
from synapse.storage.database import (
|
||||
DatabasePool,
|
||||
|
|
@ -75,7 +74,7 @@ class StickyEventsWorkerStore(StateGroupWorkerStore, CacheInvalidationWorkerStor
|
|||
|
||||
# Technically this means we will cleanup N times, once per event persister, maybe put on master?
|
||||
if self._can_write_to_sticky_events:
|
||||
self._clock.looping_call(
|
||||
self.clock.looping_call(
|
||||
self._run_background_cleanup, DELETE_EXPIRED_STICKY_EVENTS_MS
|
||||
)
|
||||
|
||||
|
|
@ -629,8 +628,7 @@ class StickyEventsWorkerStore(StateGroupWorkerStore, CacheInvalidationWorkerStor
|
|||
return round(time.time() * 1000)
|
||||
|
||||
def _run_background_cleanup(self) -> Deferred:
|
||||
return run_as_background_process(
|
||||
return self.hs.run_as_background_process(
|
||||
"delete_expired_sticky_events",
|
||||
self.server_name,
|
||||
self._delete_expired_sticky_events,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue