Exemple #1
0
 def _outputs(self, cfg, sources):
     outputs = {}
     for output in cfg.outputs:
         output_type = output['type']
         create_fn = plugin('output', output_type, 'create')
         outputs[output_type] = create_fn(cfg.regions, sources, output)
     return outputs
Exemple #2
0
 def _sources(self, cfg):
     sources = []
     for source in cfg.sources:
         source_type = source['type']
         create_fn = plugin('source', source_type, 'create')
         sources.append((source_type, create_fn(source)))
     return sources
Exemple #3
0
def _make_queue(j, config):
    """
    Makes a queue object by looking up the plugin module mentioned in the type
    parameter of the configuration.
    """
    typ = config['type']
    create_fn = plugin('queue', typ, 'create')
    return create_fn(j, config)
Exemple #4
0
 def __init__(self, cfg):
     store_type = cfg['store']['type']
     create_fn = plugin('store', store_type, 'create')
     self.store = create_fn(cfg['store'])
     self.cache_dir = cfg['cache_dir']
Exemple #5
0
 def _store(self, store_cfg):
     store_type = store_cfg['type']
     create_fn = plugin('store', store_type, 'create')
     return create_fn(store_cfg)
Exemple #6
0
 def __init__(self, cfg):
     store_type = cfg['store']['type']
     create_fn = plugin('store', store_type, 'create')
     self.store = create_fn(cfg['store'])
     self.cache_dir = cfg['cache_dir']