def update(force=False, threaded=False, preload=False): """ Update the entire database. """ app.config['NOMENKLATURA_PRELOAD'] = not preload indexer = get_indexer() try: for stage in [GREMIUM, PERSON, ABSTIMMUNG, ABLAUF, TRANSCRIPT]: process(indexer, stage, force=force, threaded=threaded) log.debug("Finish updating: %s" % stage) finally: indexer.flush()
def update(force=False, threaded=False, preload=False): """ Update the entire database. """ app.config["NOMENKLATURA_PRELOAD"] = not preload engine = etl_engine() indexer = get_indexer() try: for stage in [GREMIUM, PERSON, ABSTIMMUNG, ABLAUF, TRANSCRIPT]: process(engine, indexer, proc, force=force, threaded=threaded) finally: indexer.flush()
def _stage(proc, url=None, force=False, threaded=False, preload=True): app.config['NOMENKLATURA_PRELOAD'] = preload indexer = get_indexer() try: if url is None: process(indexer, proc, force=force, threaded=threaded) else: engine = etl_engine() proc['handler'](engine, indexer, url, force=force) finally: indexer.flush()
def _stage(proc, url=None, force=False, threaded=False, preload=True): app.config["NOMENKLATURA_PRELOAD"] = preload indexer = get_indexer() try: if url is None: process(indexer, proc, force=force, threaded=threaded) else: engine = etl_engine() proc["handler"](engine, indexer, url, force=force) finally: indexer.flush()