def generate_tasks(**kwargs):
    tasks = _local_tasks()
    for fun, args in tasks:
        fun(*args)

    tasks.clear()
Goes through thread local index update tasks set and generates
dataset/ETHPy150Open mozilla/kitsune/kitsune/search/models.py/generate_tasks