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 authored and dwoz committed May 22, 2024
1 parent 8a4228e commit 8743551
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 @@ -1857,15 +1857,12 @@ def _target(cls, minion_instance, opts, data, connected, creds_map):
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 8743551

Please sign in to comment.