Skip to content

Commit

Permalink
Remove dead logic
Browse files Browse the repository at this point in the history
monitor.update does not return anything
  • Loading branch information
yngve-sk committed Feb 27, 2025
1 parent ff0c7a2 commit 307e070
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/everest/detached/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from everest.strings import (
EVEREST_SERVER_CONFIG,
OPT_PROGRESS_ENDPOINT,
OPT_PROGRESS_ID,
SIM_PROGRESS_ID,
START_EXPERIMENT_ENDPOINT,
STOP_ENDPOINT,
Expand Down Expand Up @@ -252,14 +251,13 @@ def server_is_running(url: str, cert: str, auth: tuple[str, str]) -> bool:

def start_monitor(
server_context: tuple[str, str, tuple[str, str]],
callback: Callable[..., dict[str, Any]],
callback: Callable[..., None],
polling_interval: float = 0.1,
) -> None:
"""
Checks status on Everest server and calls callback when status changes
Monitoring stops when the server stops answering. It can also be
interrupted by returning True from the callback
Monitoring stops when the server stops answering.
"""
url, cert, auth = server_context
opt_endpoint = "/".join([url, OPT_PROGRESS_ENDPOINT])
Expand Down Expand Up @@ -295,8 +293,6 @@ def start_monitor(
new_opt_status = _query_server(cert, auth, opt_endpoint)
if new_opt_status != opt_status:
opt_status = new_opt_status
ret = bool(callback({OPT_PROGRESS_ID: opt_status}))
stop |= ret
time.sleep(polling_interval)
except:
logging.debug(traceback.format_exc())
Expand Down

0 comments on commit 307e070

Please sign in to comment.