예제 #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)