diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-07-03 09:31:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 09:31:27 +0100 |
commit | 91753cae5962a56ce0440b06891f1040ba7582e9 (patch) | |
tree | 8a2e5f3127b652f5b24ad877c0adb18612175d37 /synapse/storage/events.py | |
parent | Remove SMTP_* env var functionality from docker conf (#5596) (diff) | |
download | synapse-91753cae5962a56ce0440b06891f1040ba7582e9.tar.xz |
Fix a number of "Starting txn from sentinel context" warnings (#5605)
Fixes #5602, #5603
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index fefba39ea1..86f8485704 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -253,7 +253,14 @@ class EventsStore( ) # Read the extrems every 60 minutes - hs.get_clock().looping_call(self._read_forward_extremities, 60 * 60 * 1000) + def read_forward_extremities(): + # run as a background process to make sure that the database transactions + # have a logcontext to report to + return run_as_background_process( + "read_forward_extremities", self._read_forward_extremities + ) + + hs.get_clock().looping_call(read_forward_extremities, 60 * 60 * 1000) @defer.inlineCallbacks def _read_forward_extremities(self): |