def update_user_in_es(sender, couch_user, **kwargs):
    send_to_elasticsearch("users", couch_user.to_json(),
                          delete=couch_user.to_be_deleted())
Automatically sync the user to elastic directly on save or delete
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/users/signals.py/update_user_in_es