Skip to content

Commit

Permalink
fix(rpp.manager): improve logging for runtime shutdown callback and h…
Browse files Browse the repository at this point in the history
…andle missing callback case
  • Loading branch information
manucabral committed Nov 10, 2024
1 parent ca84cf2 commit 158873d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rpp/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __runtime_thread(self, callback: typing.Callable) -> None:
self.runtime.running = False
self.log.info("Runtime thread stopped. Maybe the browser was closed.")
if callback == self.runtime.shutdown_callback and callback is not None:
self.log.info("Calling shutdown callback...")
self.log.info("Runtime shutdown callback...")
for presence in self.presences:
if presence.web and presence.running:
presence.on_close()
Expand All @@ -188,6 +188,8 @@ def __runtime_thread(self, callback: typing.Callable) -> None:
"%s stopped because the runtime was closed.", presence.name
)
return callback()
else:
self.log.warning("No callback found.")

def download_presence(self, presence_name: str) -> None:
"""
Expand Down

0 comments on commit 158873d

Please sign in to comment.