summary refs log tree commit diff
path: root/synapse/util/__init__.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-07-03 09:49:35 +0100
committerRichard van der Hoff <richard@matrix.org>2019-07-03 09:49:35 +0100
commit43e01be1584ea511541bbd259e978e161bf22f74 (patch)
tree0f369599513c1218645da8a385d4fdff0cdb8a1c /synapse/util/__init__.py
parentMerge branch 'release-v1.1.0' into matrix-org-hotfixes (diff)
parentFix a number of "Starting txn from sentinel context" warnings (#5605) (diff)
downloadsynapse-43e01be1584ea511541bbd259e978e161bf22f74.tar.xz
Merge remote-tracking branch 'origin/release-v1.1.0' into matrix-org-hotfixes
Diffstat (limited to 'synapse/util/__init__.py')
-rw-r--r--synapse/util/__init__.py8
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