def process_request(self, request):
        pinned_until = request.session.get(PINNING_KEY, False)
        if pinned_until and pinned_until > datetime.now():
            pinning.pin_thread()
Set the thread's pinning flag according to the presence of the session
dataset/ETHPy150Open michaelhelmick/django-balancer/balancer/middleware.py/PinningSessionMiddleware.process_request