def handle(self, *args, **options):
        logger = logging.getLogger(__name__)
        logger.info('start django-sockjs-server')
        self.config = SockJSServerSettings()

        io_loop = tornado.ioloop.IOLoop.instance()

        router = SockJSRouterPika(
            SockJSConnection,
            self.config.listen_location,
            user_settings=self.config.router_settings)
        app = tornado.web.Application([(r"/stats/(.*)", StatsHandler, dict(sockjs_server=router._connection.sockjs_server))] +
                                      router.urls)


        app.listen(
            self.config.listen_port, 
            address=self.config.listen_addr
        )
        try:
            io_loop.start()
        except __HOLE__:
            pass
dataset/ETHPy150Open alfss/django-sockjs-server/django_sockjs_server/management/commands/sockjs_server.py/Command.handle