Skip to content

Commit

Permalink
Add readiness check in daemon context πŸš€
Browse files Browse the repository at this point in the history
- Modified `daemon.py` to include `wait_for_readiness()` function.
- Ensures the daemon is fully operational after spawning.

This change enhances the reliability of the daemon by confirming it's ready
before proceeding. This minimizes potential errors due to asynchronous
operation states. πŸ“ˆ
  • Loading branch information
horta committed Dec 6, 2024
1 parent 9cad700 commit a7bdf6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions h3daemon/h3daemon/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def daemon_context(hmmfile: HMMFile, cport: int = 0, wport: int = 0):
ensure_pressed(hmmfile)
x = Daemon.spawn(hmmfile, cport, wport)
try:
x.wait_for_readiness()
yield x
finally:
x.shutdown()

0 comments on commit a7bdf6e

Please sign in to comment.