mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #30772 from HerrBerg/develop
supervisord: allow updating single process groups
This commit is contained in:
commit
629c0b2829
@ -245,10 +245,13 @@ def reread(user=None, conf_file=None, bin_env=None):
|
||||
return _get_return(ret)
|
||||
|
||||
|
||||
def update(user=None, conf_file=None, bin_env=None):
|
||||
def update(name=None, user=None, conf_file=None, bin_env=None):
|
||||
'''
|
||||
Reload config and add/remove as necessary
|
||||
Reload config and add/remove/update as necessary
|
||||
|
||||
name
|
||||
name of the process group to update. if none then update any
|
||||
process group that has changes
|
||||
user
|
||||
user to run supervisorctl as
|
||||
conf_file
|
||||
@ -263,8 +266,15 @@ def update(user=None, conf_file=None, bin_env=None):
|
||||
|
||||
salt '*' supervisord.update
|
||||
'''
|
||||
|
||||
if isinstance(name, string_types):
|
||||
if name.endswith(':'):
|
||||
name = name[:-1]
|
||||
elif name.endswith(':*'):
|
||||
name = name[:-2]
|
||||
|
||||
ret = __salt__['cmd.run_all'](
|
||||
_ctl_cmd('update', None, conf_file, bin_env),
|
||||
_ctl_cmd('update', name, conf_file, bin_env),
|
||||
runas=user,
|
||||
python_shell=False,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user