[+] ending ALL tasks on SIGINT signal

pull/143/head
ZetGo | Aleksej K. 2025-06-06 01:16:00 +03:00
parent 32fa27e9ad
commit 5f8f69dd5f
1 changed files with 3 additions and 0 deletions

View File

@ -1000,6 +1000,9 @@ class Heroku:
except: pass
for c in self.clients:
await c.disconnect()
for task in asyncio.all_tasks():
if task is not asyncio.current_task():
task.cancel()
def main(self):
"""Main entrypoint"""