def update_stats()

in opbeans/tasks.py [0:0]


def update_stats():
    if random.random() > 0.8:
        dict_for_truncation = {k: k for k in range(500)}
        assert False, "Bad luck!"
    elasticapm.label(a="x", b="y")
    elasticapm.set_custom_context({"a": "x", "b": "y"})
    cache.set(utils.stats.cache_key, utils.stats(), 60)