소스 검색

Fix search errors due to stream readers exiting before grep is finished

master
JustAnotherArchivist 3 년 전
부모
커밋
65c4df27d2
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. +2
    -0
      irclog.py

+ 2
- 0
irclog.py 파일 보기

@@ -1040,6 +1040,8 @@ class WebServer:
stdoutTask = asyncio.create_task(process_stdout())
stderrTask = asyncio.create_task(process_stderr())
await asyncio.wait({stdoutTask, stderrTask}, timeout = self.config['web']['search']['maxTime'])
# The stream readers may quit before the process is done even on a successful grep. Wait a tiny bit longer for the process to exit.
await asyncio.wait({asyncio.create_task(proc.wait())}, timeout = 0.1)
if proc.returncode is None:
# Process hasn't finished yet after maxTime. Murder it and wait for it to die.
self.logger.warning(f'Request {id(request)} grep took more than the time limit')


불러오는 중...
취소
저장