Skip to content

Commit

Permalink
Handle readyness check timing out
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Dec 28, 2018
1 parent 2ca085c commit a6c06c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion simpervisor/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ async def ready(self):
# FIXME: What's the timeout for each readyness check handler?
# FIXME: We should probably check again if our process is still running
# FIXME: Should we be locking something here?
is_ready = await asyncio.wait_for(self.ready_func(self), 1)
try:
is_ready = await asyncio.wait_for(self.ready_func(self), 1)
except asyncio.TimeoutError:
is_ready = False
cur_time = time.time() - start_time
self._debug_log(
'ready-wait',
Expand Down

0 comments on commit a6c06c3

Please sign in to comment.