Skip to content

Commit

Permalink
Get rid of run_func in salt.Minion._target
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhestkov committed May 13, 2024
1 parent 25aaafb commit 0e130dd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions salt/minion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1805,15 +1805,12 @@ def _target(cls, minion_instance, opts, data, connected):
uid = salt.utils.user.get_uid(user=opts.get("user", None))
minion_instance.proc_dir = get_proc_dir(opts["cachedir"], uid=uid)

def run_func(minion_instance, opts, data):
with salt.utils.ctx.request_context({"data": data, "opts": opts}):
if isinstance(data["fun"], tuple) or isinstance(data["fun"], list):
return Minion._thread_multi_return(minion_instance, opts, data)
else:
return Minion._thread_return(minion_instance, opts, data)

with salt.utils.ctx.request_context({"data": data, "opts": opts}):
run_func(minion_instance, opts, data)

def _execute_job_function(
self, function_name, function_args, executors, opts, data
):
Expand Down

0 comments on commit 0e130dd

Please sign in to comment.