czcorpus / kontext

An advanced, extensible web front-end for the Manatee-open corpus search engine
GNU General Public License v2.0
60 stars 22 forks source link

Rewrite internal http client lifecycle. #6121

Closed tomachalek closed 6 months ago

tomachalek commented 6 months ago

Now it is a single session per each request. This means that in case a single KonText request requires to perform multiple http requests to different services (this is typical e.g. for some plug-in requests), only a single session is used for all the requests.

The ClientSession is attached to request.ctx and is initialized via Sanic request middleware and closed via Sanic response middleware.