tornado.web — RequestHandler and Application classes — Tornado 4.3 documentation
RequestHandler.on_finish [source] Called after the end of a request. Override this method to perform cleanup, logging, etc. This method is a counterpart to prepare. on_finish may not produce any output, as it is called after the response has been sent to ...