Skip to content

Commit

Permalink
Merge pull request #126 from neptune-ai/kg/fix-bug-in-wait
Browse files Browse the repository at this point in the history
Fix logic in `Run._wait()`
  • Loading branch information
kgodlewski authored Jan 17, 2025
2 parents cadc490 + dd6f96b commit 3e5e8f6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/neptune_scale/api/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,11 @@ def _wait(
if wait_seq.value >= self._operations_queue.last_sequence_id:
return True

if is_closing:
if threading.current_thread() != self._closing_thread:
if verbose:
logger.warning("Waiting interrupted by run termination")
if is_closing and threading.current_thread() != self._closing_thread:
if verbose:
logger.warning("Waiting interrupted by run termination")

self._close_completed.wait(wait_time)
self._close_completed.wait(wait_time)

return False

Expand Down

0 comments on commit 3e5e8f6

Please sign in to comment.