mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:46:07 -04:00
Fix a number of "Starting txn from sentinel context" warnings (#5605)
Fixes #5602, #5603
This commit is contained in:
parent
c7b48bd42d
commit
91753cae59
5 changed files with 35 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue