Skip to content

Commit

Permalink
Replace add_background_task() in Toga automation bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed Aug 29, 2024
1 parent af1430a commit 97d167c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions automation/src/automation/bootstraps/toga.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ def startup(self):
self.main_window.content = main_box
self.main_window.show()
self.add_background_task(self.exit_soon)
async def exit_soon(self, app: toga.App, **kwargs):
"""Background task that closes the app after a few seconds."""
async def on_running(self):
"""Close the app after a few seconds."""
await asyncio.sleep(2)
print("{EXIT_SUCCESS_NOTIFY}")
print("{BRIEFCASE_EXIT_SUCCESS_SIGNAL}")
Expand Down

0 comments on commit 97d167c

Please sign in to comment.