diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-14 11:00:02 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-14 11:00:02 +0000 |
commit | 47b03318d1d202200ad73efbc38c18fb6ab05d90 (patch) | |
tree | 68de017af9e0d626e85efd0dcbcf5f2828f5c7fe /synapse/util | |
parent | Remove SMTP_* env var functionality from docker conf (#5596) (diff) | |
parent | Fix a number of "Starting txn from sentinel context" warnings (#5605) (diff) | |
download | synapse-47b03318d1d202200ad73efbc38c18fb6ab05d90.tar.xz |
Fix a number of "Starting txn from sentinel context" warnings (#5605)
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 762f876752..58fc8f37f8 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py @@ -62,7 +62,10 @@ class Clock(object): def looping_call(self, f, msec, *args, **kwargs): """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. @@ -79,6 +82,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 |