From 74151f26195ad01bcb349931f1f19034f3ebdbac Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 14 Oct 2020 10:46:07 -0400 Subject: [PATCH 1/2] Clean-up old transaction IDs on the background worker. --- synapse/storage/databases/main/events_worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/storage/databases/main/events_worker.py b/synapse/storage/databases/main/events_worker.py index 3ec4d1d9c2ff..58ac6e54ce6e 100644 --- a/synapse/storage/databases/main/events_worker.py +++ b/synapse/storage/databases/main/events_worker.py @@ -136,7 +136,7 @@ def __init__(self, database: DatabasePool, db_conn, hs): db_conn, "events", "stream_ordering", step=-1 ) - if not hs.config.worker.worker_app: + if hs.config.run_background_tasks: # We periodically clean out old transaction ID mappings self._clock.looping_call( run_as_background_process, From d94b6ef1d03a781fd43f6026c69d8c27b71349b2 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 14 Oct 2020 13:14:26 -0400 Subject: [PATCH 2/2] Add a newsfragment. --- changelog.d/8544.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/8544.feature diff --git a/changelog.d/8544.feature b/changelog.d/8544.feature new file mode 100644 index 000000000000..542993110bc8 --- /dev/null +++ b/changelog.d/8544.feature @@ -0,0 +1 @@ +Allow running background tasks in a separate worker process.