mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Add syndic_id param for API compatibility
Also fix successive updates
This commit is contained in:
parent
1d39eec69b
commit
cb92114377
@ -210,9 +210,10 @@ def save_load(jid, clear_load):
|
||||
save_minions(jid, minions)
|
||||
|
||||
|
||||
def save_minions(jid, minions):
|
||||
def save_minions(jid, minions, syndic_id=None): # pylint: disable=unused-argument
|
||||
'''
|
||||
Save/update the minion list for a given jid
|
||||
Save/update the minion list for a given jid. The syndic_id argument is
|
||||
included for API compatibility only.
|
||||
'''
|
||||
cb_ = _get_connection()
|
||||
|
||||
@ -223,7 +224,12 @@ def save_minions(jid, minions):
|
||||
return False
|
||||
|
||||
# save the minions to a cache so we can see in the UI
|
||||
jid_doc.value['minions'] = minions
|
||||
if 'minions' in jid_doc.value:
|
||||
jid_doc.value['minions'] = sorted(
|
||||
set(jid_doc.value['minions'] + minions)
|
||||
)
|
||||
else:
|
||||
jid_doc.value['minions'] = minions
|
||||
cb_.replace(str(jid), jid_doc.value, cas=jid_doc.cas, ttl=_get_ttl())
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user