2017-02-14 7 views
0

kaldi 용으로 gstreamer server을 실행 중입니다. 토네이도를 사용하여 내부적으로 전사 용 HTTP 끝점을 제공합니다. 나는이 관련 코드라고 생각 Tornado 서버에서 요청 시간 제한을 설정하는 방법은 무엇입니까?

을 example.com:8888/dynamic/recognize :

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)은 자체적으로 설정할 시간 제한을 관리해야합니다.