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/util | |
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/util')
-rw-r--r-- | synapse/util/__init__.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py index dcc747cac1..954e32fb2a 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py @@ -62,7 +62,10 @@ class Clock(object): def looping_call(self, f, msec): """Call a function repeatedly. - Waits `msec` initially before calling `f` for the first time. + Waits `msec` initially before calling `f` for the first time. + + Note that the function will be called with no logcontext, so if it is anything + other than trivial, you probably want to wrap it in run_as_background_process. Args: f(function): The function to call repeatedly. @@ -77,6 +80,9 @@ class Clock(object): def call_later(self, delay, callback, *args, **kwargs): """Call something later + Note that the function will be called with no logcontext, so if it is anything + other than trivial, you probably want to wrap it in run_as_background_process. + Args: delay(float): How long to wait in seconds. callback(function): Function to call |