#31508: ASGI Lifespan Support
-------------------------------------+-------------------------------------
Reporter: Braunson | Owner:
| Konstantin Volkov
Type: New feature | Status: closed
Component: HTTP handling | Version: 3.0
Severity: Normal | Resolution: wontfix
Keywords: async | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by jacoobes):
Replying to [comment:17 VaĊĦek Dohnal]:
> I needed lifespan support in Django to make use of HTTP connection
pooling in the HTTPX client. Inspired by the closed pull request
([https://github.com/django/django/pull/13636 django/django#13636]), I put
together an external package, [https://github.com/illagrenan/django-asgi-
lifespan django-asgi-lifespan]. The package works by inheriting from the
standard ASGIHandler and converting lifespan signals to Django signals.
This way, it is possible to create and destroy some shared resource that
is stored in the
[https://asgi.readthedocs.io/en/latest/specs/lifespan.html#lifespan-state
ASGI Lifespan State].
thank you! I need this in order to properly manage an AsyncConnectionPool
using psycopg(3).
--
Ticket URL: <https://code.djangoproject.com/ticket/31508#comment:18>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019438638c1c-5efe02c8-be72-49f9-932f-a9fab6ff799e-000000%40eu-central-1.amazonses.com.