Skip to content

Commit 12abfb2

Browse files
committed
Import run_as_background_process from Module API
The internal API should not be used, and recently changed shape in element-hq/synapse#18670. Use the version on the module API instead.
1 parent cc57cdb commit 12abfb2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

synapse_spamcheck_badlist/bad_list_filter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from twisted.internet import defer, reactor
2222
from twisted.internet.threads import deferToThread
2323

24-
from synapse.metrics.background_process_metrics import run_as_background_process
2524
from synapse.module_api import make_deferred_yieldable
2625

2726
logger = logging.getLogger(__name__)
@@ -98,7 +97,7 @@ def __init__(self, config, api):
9897
# a fallback in `_get_links_automaton()`.
9998
reactor.callWhenRunning(
10099
lambda: defer.ensureDeferred(
101-
run_as_background_process(func=self._update_links_automaton, desc="Background initial pull list of bad links")
100+
api.run_as_background_process(func=self._update_links_automaton, desc="Background initial pull list of bad links")
102101
)
103102
)
104103

0 commit comments

Comments
 (0)