Skip to content

Commit

Permalink
add some further logging
Browse files Browse the repository at this point in the history
  • Loading branch information
flxdot committed Apr 24, 2024
1 parent fa6b18c commit 2a736ec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/py_edge_device/carlos/edge/device/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ async def run(self):
tg.create_task(self.communication_handler.listen())
tg.create_task(self._run_task_scheduler())

logger.debug("Device runtime exited.")

async def stop(self):
"""Stops the device runtime."""
self.communication_handler.stop()
Expand All @@ -69,8 +71,12 @@ async def _handle_signal(self, signum: int):
logger.error("Stopping the device runtime timed out.")
exit(1)

logger.debug("Stopping the event loop.")
loop = asyncio.get_event_loop()
loop.stop()
loop.close()

logger.info("Device runtime stopped.")
exit(0)

def _prepare_runtime(self):
"""Prepares the device runtime."""
Expand Down

0 comments on commit 2a736ec

Please sign in to comment.