Ejemplo n.º 1
0
    def setup_class(cls):
        """Create a temporary DXR instance on the FS, and build it."""
        cls._config_dir_path = mkdtemp()
        code_path = join(cls._config_dir_path, 'code')
        mkdir(code_path)
        _make_file(code_path, cls.source_filename, cls.source)

        for tree in cls.config().trees.itervalues():
            index_and_deploy_tree(tree)
        cls._es().refresh()
Ejemplo n.º 2
0
    def setup_class(cls):
        """Create a temporary DXR instance on the FS, and build it."""
        cls._config_dir_path = mkdtemp()
        code_path = join(cls._config_dir_path, 'code')
        mkdir(code_path)
        _make_file(code_path, cls.source_filename, cls.source)

        for tree in cls.config().trees.itervalues():
            index_and_deploy_tree(tree)
        cls._es().refresh()
Ejemplo n.º 3
0
def index(config, verbose, tree_names):
    """Build indices for one or more trees.

    When finished, update elasticsearch aliases and the catalog index to make
    the new indices available to the DXR server process.

    Each of TREES is an INI section title from the config file, specifying a
    source tree to build. If none are specified, we build all trees, in the
    order they occur in the file.

    """
    for tree in tree_objects(tree_names, config):
        index_and_deploy_tree(tree, verbose=verbose)
Ejemplo n.º 4
0
def index(config, verbose, tree_names):
    """Build indices for one or more trees.

    When finished, update elasticsearch aliases and the catalog index to make
    the new indices available to the DXR server process.

    Each of TREES is an INI section title from the config file, specifying a
    source tree to build. If none are specified, we build all trees, in the
    order they occur in the file.

    """
    for tree in tree_objects(tree_names, config):
        index_and_deploy_tree(tree, verbose=verbose)
Ejemplo n.º 5
0
 def index(cls):
     for tree in cls.config().trees.itervalues():
         index_and_deploy_tree(tree)
Ejemplo n.º 6
0
 def index(cls):
     """Run a DXR indexing job."""
     for tree in cls.config().trees.itervalues():
         index_and_deploy_tree(tree)
Ejemplo n.º 7
0
 def index(cls):
     for tree in cls.config().trees.itervalues():
         index_and_deploy_tree(tree)