mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Docstring fixes
This commit is contained in:
parent
6a5e032214
commit
b69152f31b
2 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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({})
|
||||
|
|
Loading…
Add table
Reference in a new issue