2017-02-14 54 views
0

我为kaldi运行gstreamer server,它在内部使用龙卷风为转录提供HTTP终点,例如, example.com:8888/dynamic/recognize如何在Tornado服务器中设置请求超时?

我认为这是相关代码:

class Application(tornado.web.Application): 
    def __init__(self): 
     settings = dict(
      template_path=os.path.join(os.path.dirname(os.path.dirname(__file__)), "templates"), 
      static_path=os.path.join(os.path.dirname(os.path.dirname(__file__)), "static"), 
      autoescape=None, 
     ) 

     handlers = [ 
      [...] 
      (r"/client/dynamic/recognize", HttpChunkedRecognizeHandler), 
      [...], 
     ] 
     tornado.web.Application.__init__(self, handlers, **settings) 

Source

我不熟悉的龙卷风,但是看着tornado.web.Applicationdocs,我不请参阅settings中的任何超时提示。

我看到其他几个类似的问题,例如, this one,但他们处理客户端。 This answer似乎相关,但我不知道如何应用它在我的情况。

回答

1

Tornado没有通用的超时机制,因为它经常用于长轮询和类似的请求。应用程序(在这种情况下,gstreamer)负责管理它想要自行设置的任何超时。

相关问题