diff --git a/beat/core/agent.py b/beat/core/agent.py index 152a9e14b50d35d2cd85f700e89506ef4e107ac2..e38d067d63163be2d425a86adc37287f3fd0d5e1 100755 --- a/beat/core/agent.py +++ b/beat/core/agent.py @@ -306,37 +306,42 @@ class Agent(object): volumes = {} if not configuration.proxy_mode: - for name, details in configuration.data['inputs'].items(): - if 'database' in details: - continue - - basename = os.path.join(configuration.cache, details['path']) - filenames = glob.glob(basename + '*.data') - filenames.extend(glob.glob(basename + '*.data.checksum')) - filenames.extend(glob.glob(basename + '*.data.index')) - filenames.extend(glob.glob(basename + '*.data.index.checksum')) - - for filename in filenames: - volumes[filename] = { - 'bind': os.path.join('/cache', filename.replace(configuration.cache + '/', '')), - 'mode': 'ro', - } - - if 'result' in configuration.data: - outputs_config = { - 'result': configuration.data['result'] - } - else: - outputs_config = configuration.data['outputs'] - - for name, details in outputs_config.items(): - basename = os.path.join(configuration.cache, details['path']) - dirname = os.path.dirname(basename) - - volumes[dirname] = { - 'bind': os.path.join('/cache', dirname.replace(configuration.cache + '/', '')), - 'mode': 'rw', - } + volumes[configuration.cache] = { + 'bind': '/cache', + 'mode': 'rw', + } + + # for name, details in configuration.data['inputs'].items(): + # if 'database' in details: + # continue + # + # basename = os.path.join(configuration.cache, details['path']) + # filenames = glob.glob(basename + '*.data') + # filenames.extend(glob.glob(basename + '*.data.checksum')) + # filenames.extend(glob.glob(basename + '*.data.index')) + # filenames.extend(glob.glob(basename + '*.data.index.checksum')) + # + # for filename in filenames: + # volumes[filename] = { + # 'bind': os.path.join('/cache', filename.replace(configuration.cache + '/', '')), + # 'mode': 'ro', + # } + # + # if 'result' in configuration.data: + # outputs_config = { + # 'result': configuration.data['result'] + # } + # else: + # outputs_config = configuration.data['outputs'] + # + # for name, details in outputs_config.items(): + # basename = os.path.join(configuration.cache, details['path']) + # dirname = os.path.dirname(basename) + # + # volumes[dirname] = { + # 'bind': os.path.join('/cache', dirname.replace(configuration.cache + '/', '')), + # 'mode': 'rw', + # } self.process = dock.Popen( host,