Information ```dmg_states``` could be saved in a list of pickable objects and passed as argument of the celery task in order to avoid n queries (where n is the number of assets).