def __init__(self, ha_config=None, retry_delays_class=None): if ha_config is None: import docido_sdk.config as config ha_config = config.get(HA.HA_CONFIG_KEY, nameddict(HA.DEFAULT_HA_CONFIG)) self.ha_config = ha_config self._retry_delays_class = retry_delays_class or RetryDelaySeries
def __get_crawler_mapping_config(cls, service): pr_config = docido_config.get('pull_crawlers', {}) crawlers_config = pr_config.get('crawlers', {}) crawler_config = crawlers_config.get(service, {}) crawler_index_config = crawler_config.get('indexing', {}) crawler_es = crawler_index_config.get('elasticsearch', {}) return crawler_es.get('mapping', {})
def service(self, service): prs = docido_config.get('pull_crawlers') or {} crawlers_config = prs.get('crawlers') or {} return (crawlers_config.get(service) or {}).get('indexing', {})