poll() takes times in ms not seconds
This commit is contained in:
parent
f0d4952055
commit
8fb24fbc1e
1 changed files with 2 additions and 2 deletions
|
|
@ -164,7 +164,7 @@ def __call__(
|
|||
input_buf = b''
|
||||
st = time.monotonic()
|
||||
while time.monotonic() - st < timeout:
|
||||
for (fd, event) in self.poll.poll(0.2):
|
||||
for (fd, event) in self.poll.poll(200):
|
||||
if event & error_events:
|
||||
raise PrewarmProcessFailed('Failed doing I/O with prewarm process')
|
||||
if fd == self.read_from_process_fd and event & select.POLLIN:
|
||||
|
|
@ -192,7 +192,7 @@ def send_to_prewarm_process(self, output_buf: Union[str, bytes] = b'', timeout:
|
|||
st = time.monotonic()
|
||||
while time.monotonic() - st < timeout and output_buf:
|
||||
self.poll_to_send(bool(output_buf))
|
||||
for (fd, event) in self.poll.poll(0.2):
|
||||
for (fd, event) in self.poll.poll(200):
|
||||
if event & error_events:
|
||||
raise PrewarmProcessFailed('Failed doing I/O with prewarm process: {event}')
|
||||
if fd == self.write_to_process_fd and event & select.POLLOUT:
|
||||
|
|
|
|||
Loading…
Reference in a new issue