diff --git a/src/model.py b/src/model.py index d80ca81d..c553cfd0 100644 --- a/src/model.py +++ b/src/model.py @@ -118,6 +118,10 @@ async def await_shutdown(self): ) await asyncio.sleep(5) + for task in asyncio.all_tasks(loop=self._loop): + if task is not asyncio.current_task(): + task.cancel() + self.logger.log_info("Shutdown complete") def get_sampling_params_dict(self, params_json):