Skip to content

Commit

Permalink
comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed May 15, 2024
1 parent 614bc2a commit f1e0216
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions spinnman/spalloc/spalloc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,11 +646,11 @@ def destroy(self, reason: str = "finished"):

def __keepalive(self) -> bool:
"""
Signal the that we want it to stay alive for a while longer.
Signal spalloc that we want the job to stay alive for a while longer.
:return: True if the job has not been destroyed
:rtype: bool
"""
:return: False if the job has not been destroyed
:rtype: bool
"""
if self._keepalive_url is None:
return False
cookies, headers = self._session_credentials
Expand All @@ -661,6 +661,10 @@ def __keepalive(self) -> bool:
return True

def __start_keepalive(self) -> None:
"""
Method for keep alive thread to start the keep alive class
"""
try:
while self.__keepalive():
time.sleep(KEEP_ALIVE_PERIOND / 2)
Expand Down

0 comments on commit f1e0216

Please sign in to comment.