Merge pull request #498 from arabcoders/dev
Some checks failed
native-build / build (amd64, ubuntu-latest) (push) Has been cancelled
native-build / build (amd64, windows-latest) (push) Has been cancelled
native-build / build (arm64, macos-latest) (push) Has been cancelled
native-build / build (arm64, ubuntu-latest) (push) Has been cancelled
native-build / build (arm64, windows-latest) (push) Has been cancelled

Fix: regrassion in tasks due change in how we handle event loop
This commit is contained in:
Abdulmohsen 2025-11-19 02:57:16 +03:00 committed by GitHub
commit 9272e0b173
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -302,14 +302,7 @@ class Tasks(metaclass=Singleton):
"The tasks file."
self._encoder: Encoder = encoder or Encoder()
"The JSON encoder."
if loop:
self._loop: asyncio.AbstractEventLoop = loop
else:
try:
self._loop = asyncio.get_running_loop()
except RuntimeError:
self._loop = asyncio.new_event_loop()
asyncio.set_event_loop(self._loop)
self._loop: asyncio.AbstractEventLoop = loop or asyncio.get_event_loop()
"The event loop."
self._scheduler: Scheduler = scheduler or Scheduler.get_instance()
"The scheduler."