From bf23ec6320d792e3ad76279fa27346dc816e8e6a Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Thu, 25 Apr 2024 17:21:26 +0200 Subject: [PATCH] Revert "fix: Wrap asgi application to ignore lifetime requests" (#21854) Revert "fix: Wrap asgi application to ignore lifetime requests (#21802)" This reverts commit d2ed2ea9dfa359856356a2e38cc961b9c10d60d2. --- posthog/asgi.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/posthog/asgi.py b/posthog/asgi.py index 678645bb01d3b..22912a0c7b76e 100644 --- a/posthog/asgi.py +++ b/posthog/asgi.py @@ -1,17 +1,8 @@ import os from django.core.asgi import get_asgi_application -from django.http.response import HttpResponse os.environ.setdefault("DJANGO_SETTINGS_MODULE", "posthog.settings") os.environ.setdefault("SERVER_GATEWAY_INTERFACE", "ASGI") - -def lifetime_wrapper(func): - async def inner(scope, receive, send): - if scope["type"] != "http": - return HttpResponse(status=501) - return func(scope, receive, send) - - -application = lifetime_wrapper(get_asgi_application()) +application = get_asgi_application()