def awake(self, transaction): """Let servlet awake. Makes instance variables from the transaction. This is where Page becomes unthreadsafe, as the page is tied to the transaction. This is also what allows us to implement functions like `write`, where you don't need to pass in the transaction or response. """ HTTPServlet.awake(self, transaction) self._response = transaction.response() self._request = transaction.request() self._session = None # don't create unless needed
def awake(self, transaction): """Let servlet awake. Makes instance variables from the transaction. This is where Page becomes unthreadsafe, as the page is tied to the transaction. This is also what allows us to implement functions like `write`, where you don't need to pass in the transaction or response. """ HTTPServlet.awake(self, transaction) self._response = transaction.response() self._request = transaction.request() self._session = None # don't create unless needed assert self._transaction is not None assert self._response is not None assert self._request is not None
def awake(self, transaction): """Begin transaction.""" HTTPServlet.awake(self, transaction) self._transaction = transaction
def awake(self, transaction): HTTPServlet.awake(self, transaction) self._transaction = transaction