def METHOD_NAME(logger, cfg):
    os.environ['CH_LANG'] = cfg.lang_code
    chdb.initialize_all_databases()
    if cfg.archive_dir and not archive_database(logger, cfg):
        # Log, but don't assert, this is not fatal
        logger.warning('Failed to archive database!')
    expire_stats(cfg)
    # FIXME Import and calll these scripts instead of shelling out?
    def run_script(script, cmdline = '', optional = False):
        scripts_dir = os.path.dirname(os.path.realpath(__file__))
        script_path = os.path.join(scripts_dir, script)
        cmdline = ' '.join([sys.executable, script_path, cmdline])
        assert shell(logger, cmdline) == True or optional
    unsourced = tempfile.NamedTemporaryFile()
    run_script(
        'print_unsourced_pageids_from_wikipedia.py', '> ' + unsourced.name)
    run_script('parse_live.py', unsourced.name)
    run_script('assign_categories.py')
    run_script('update_intersections.py')
    run_script('install_new_database.py')
    unsourced.close()  # deletes the file