stop_when_done

This commit is contained in:
Moishe Lettvin
2024-01-17 19:25:01 -05:00
parent 0d21768d00
commit f9f2e2d7ea
6 changed files with 15 additions and 14 deletions

View File

@@ -209,6 +209,10 @@ class DailyTransportService(EventHandler):
def wait_for_send_queue_to_empty(self):
self.threadsafe_send_queue.join()
def stop_when_done(self):
self.wait_for_send_queue_to_empty()
self.stop()
async def run(self) -> None:
self.configure_daily()