def __init__(self, *args, **kwargs): super(AsyncDjangoHandler, self).__init__(*args, **kwargs) # Set up middleware if needed. We couldn't do this earlier, because # settings weren't available. self._request_middleware = None self.initLock.acquire() # Check that middleware is still uninitialised. if self._request_middleware is None: self.load_middleware() self.initLock.release() self._auto_finish = False self.client_descriptor = None allocate_handler_id(self)
def __init__(self, *args, **kwargs): super(AsyncDjangoHandler, self).__init__(*args, **kwargs) # Set up middleware if needed. We couldn't do this earlier, because # settings weren't available. self._request_middleware = None # type: ignore # Should be List[Callable[[WSGIRequest], Any]] https://github.com/JukkaL/mypy/issues/1174 self.initLock.acquire() # Check that middleware is still uninitialised. if self._request_middleware is None: self.load_middleware() self.initLock.release() self._auto_finish = False # Handler IDs are allocated here, and the handler ID map must # be cleared when the handler finishes its response allocate_handler_id(self)
def __init__(self, *args, **kwargs): super(AsyncDjangoHandler, self).__init__(*args, **kwargs) # Set up middleware if needed. We couldn't do this earlier, because # settings weren't available. self._request_middleware = None self.initLock.acquire() # Check that middleware is still uninitialised. if self._request_middleware is None: self.load_middleware() self.initLock.release() self._auto_finish = False # Handler IDs are allocated here, and the handler ID map must # be cleared when the handler finishes its response allocate_handler_id(self)
def __init__(self, assert_callback): self.assert_callback = assert_callback self.request = DummyTornadoRequest() allocate_handler_id(self)
def __init__(self): # type: (Callable) -> None allocate_handler_id(self)
def __init__(self, assert_callback): # type: (Callable) -> None self.assert_callback = assert_callback self.request = DummyTornadoRequest() allocate_handler_id(self)
def __init__(self, assert_callback): # type: (Any) -> None self.assert_callback = assert_callback self.request = DummyTornadoRequest() allocate_handler_id(self)