Merge pull request #41287 from garethgreenaway/40748_2016_11_consul

Fix to consul cache
This commit is contained in:
Mike Place 2017-05-19 13:32:55 -05:00 committed by GitHub
commit 29bd7f48b7

View File

@ -251,12 +251,9 @@ class CkMinions(object):
If not 'greedy' return the only minions have cache data and matched by the condition. If not 'greedy' return the only minions have cache data and matched by the condition.
''' '''
cache_enabled = self.opts.get('minion_data_cache', False) cache_enabled = self.opts.get('minion_data_cache', False)
cdir = os.path.join(self.opts['cachedir'], 'minions')
def list_cached_minions(): def list_cached_minions():
if not os.path.isdir(cdir): return self.cache.list('minions')
return []
return os.listdir(cdir)
if greedy: if greedy:
minions = [] minions = []