#32049: Database connection differs between Middleware and views running under
ASGI.
-------------------------------------+-------------------------------------
     Reporter:  Hugo Osvaldo         |                    Owner:  nobody
  Barrera                            |
         Type:  Bug                  |                   Status:  closed
    Component:  HTTP handling        |                  Version:  3.1
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  ASGI                 |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Hugo Osvaldo Barrera):

 Ah, right, makes sense. I'll be sure to do testing of this kind of
 functionality with daphne too then.

 Thanks a lot for your feedback/insight here.

 It should be noted that, apparently, since both unittests and runserver
 run synchronously, these bugs are very hard to pick up -- for me they
 _only_ occur on the 404 page, and on production.

 Do you have any hints on how to safely do what I'm trying to do? E.g.:
 keep a pseudo-global state isolated to the context of a single request?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32049#comment:7>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/068.15498a543431018157840b98bd875240%40djangoproject.com.

Reply via email to