Пример #1
0
def _add_stats_for(conf, session, suite):
    status = updater.UpdateStatus()
    if updater.STAGE_STATS in conf["stages"]:
        updater.update_statistics(status, conf, session, [suite])
    if updater.STAGE_CACHE in conf["stages"]:
        updater.update_metadata(status, conf, session)
    if updater.STAGE_CHARTS in conf["stages"]:
        updater.update_charts(status, conf, session, [suite])
Пример #2
0
def _add_stats_for(conf, session, suite):
    status = updater.UpdateStatus()
    if updater.STAGE_STATS in conf['stages']:
        updater.update_statistics(status, conf, session, [suite])
    if updater.STAGE_CACHE in conf['stages']:
        updater.update_metadata(status, conf, session)
    if updater.STAGE_CHARTS in conf['stages']:
        updater.update_charts(status, conf, session, [suite])
Пример #3
0
def _remove_stats_for(conf, session, suite):
    status = updater.UpdateStatus()
    if updater.STAGE_STATS in conf['stages']:
        updater.update_statistics(status, conf, session, [suite])
        # remove newly orphan keys from stats.data
        stats_file = os.path.join(conf['cache_dir'], 'stats.data')
        stats = statistics.load_metadata_cache(stats_file)
        for k in stats.keys():
            if k.startswith('debian_' + suite + '.'):
                del (stats[k])
        statistics.save_metadata_cache(stats, stats_file)
    if updater.STAGE_CACHE in conf['stages']:
        updater.update_metadata(status, conf, session)
    if updater.STAGE_CHARTS in conf['stages']:
        updater.update_charts(status, conf, session)
Пример #4
0
def _remove_stats_for(conf, session, suite):
    status = updater.UpdateStatus()
    if updater.STAGE_STATS in conf['stages']:
        updater.update_statistics(status, conf, session, [suite])
        # remove newly orphan keys from stats.data
        stats_file = os.path.join(conf['cache_dir'], 'stats.data')
        stats = statistics.load_metadata_cache(stats_file)
        for k in stats.keys():
            if k.startswith('debian_' + suite + '.'):
                del(stats[k])
        statistics.save_metadata_cache(stats, stats_file)
    if updater.STAGE_CACHE in conf['stages']:
        updater.update_metadata(status, conf, session)
    if updater.STAGE_CHARTS in conf['stages']:
        updater.update_charts(status, conf, session)
Пример #5
0
def _remove_stats_for(conf, session, suite):
    status = updater.UpdateStatus()
    if updater.STAGE_STATS in conf["stages"]:
        updater.update_statistics(status, conf, session, [suite])
        # remove newly orphan keys from stats.data
        stats_file = conf["cache_dir"] / "stats.data"
        stats = statistics.load_metadata_cache(stats_file)
        stats = {
            k: v
            for k, v in stats.items()
            if not k.startswith("debian_" + suite + ".")
        }
        statistics.save_metadata_cache(stats, stats_file)
    if updater.STAGE_CACHE in conf["stages"]:
        updater.update_metadata(status, conf, session)
    if updater.STAGE_CHARTS in conf["stages"]:
        updater.update_charts(status, conf, session)