Skip to content

Commit

Permalink
Revert "fix: Wrap asgi application to ignore lifetime requests" (#21854)
Browse files Browse the repository at this point in the history
Revert "fix: Wrap asgi application to ignore lifetime requests (#21802)"

This reverts commit d2ed2ea.
  • Loading branch information
frankh authored Apr 25, 2024
1 parent e3acb16 commit bf23ec6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions posthog/asgi.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit bf23ec6

Please sign in to comment.