Docstring fixes

This commit is contained in:
Daniel A. Wozniak 2023-05-16 15:26:04 -07:00 committed by Gareth J. Greenaway
parent 6a5e032214
commit b69152f31b
2 changed files with 9 additions and 1 deletions

View file

@ -1140,6 +1140,11 @@ def tune_in(self, start=True):
def threaded_subproxy_tune_in(proxy_minion):
"""
Run subproxy tune in with it's own event lopp.
This method needs to be the target of a thread.
"""
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
subproxy_tune_in(proxy_minion)

View file

@ -14,7 +14,7 @@ request_ctxvar = contextvars.ContextVar(DEFAULT_CTX_VAR)
@contextlib.contextmanager
def request_context(data):
"""
A context manager that sets and un-sets the loader context
A context manager that sets and un-sets the loader context.
"""
tok = request_ctxvar.set(data)
try:
@ -24,4 +24,7 @@ def request_context(data):
def get_request_context():
"""
Get the data from the current request context.
"""
return request_ctxvar.get({})