Beispiel #1
0
    def _get_ocean_backend(self, enrich_backend):
        backend_cmd = None

        no_incremental = False
        clean = False

        from .task_projects import TaskProjects
        repos = TaskProjects.get_repos_by_backend_section(self.backend_section)
        if len(repos) == 1:
            # Support for filter raw when we have one repo
            (filter_raw, filters_raw_prefix) = self.__filters_raw(repos[0])
            if filter_raw or filters_raw_prefix:
                logger.info("Using %s %s for getting identities from raw",
                            filter_raw, filters_raw_prefix)
            ocean_backend = get_ocean_backend(backend_cmd, enrich_backend,
                                              no_incremental, filter_raw,
                                              filters_raw_prefix)
        else:
            ocean_backend = get_ocean_backend(backend_cmd, enrich_backend,
                                              no_incremental)

        elastic_ocean = get_elastic(
            self._get_collection_url(),
            self.conf[self.backend_section]['raw_index'], clean, ocean_backend)
        ocean_backend.set_elastic(elastic_ocean)

        return ocean_backend
Beispiel #2
0
    def _get_ocean_backend(self, enrich_backend):
        backend_cmd = None

        no_incremental = False
        clean = False

        ocean_backend = get_ocean_backend(backend_cmd, enrich_backend, no_incremental)
        elastic_ocean = get_elastic(self._get_collection_url(),
                                    self.conf[self.backend_name]['raw_index'],
                                    clean, ocean_backend)
        ocean_backend.set_elastic(elastic_ocean)

        return ocean_backend