def METHOD_NAME():
    gs = GlobalSettings()
    if not gs.settings.update_check_enabled:
        return
    if not gs.settings.update_check_id:
        gs.settings.set("update_check_id", uuid.uuid4().hex)
    if "runserver" in sys.argv:  # pragma: no cover
        gs.settings.set("update_check_last", now())
        gs.settings.set("update_check_result", {"error": "development"})
        return
    check_payload = {
        "id": gs.settings.update_check_id,
        "version": pretalx_version,
        "events": {
            "total": Event.objects.count(),
            "public": Event.objects.filter(is_public=True).count(),
        },
        "plugins": [
            {"name": p.module, "version": p.version} for p in get_all_plugins()
        ],
    }
    try:
        response = requests.post(
            "https://pretalx.com/.update_check/",
            json=check_payload,
        )
    except requests.RequestException:  # pragma: no cover
        gs.settings.set("update_check_last", now())
        gs.settings.set("update_check_result", {"error": "unavailable"})
        return
    gs.settings.set("update_check_last", now())
    if response.status_code != 200:
        gs.settings.set("update_check_result", {"error": "http_error"})
        return
    rdata = response.json()
    update_available = rdata["version"]["updatable"] or any(
        p["updatable"] for p in rdata["plugins"].values()
    )
    gs.settings.set("update_check_result_warning", update_available)
    if update_available and rdata != gs.settings.update_check_result:
        send_update_notification_email()
    gs.settings.set("update_check_result", rdata)