Merge branch '22-queue-stops-working-after-reconnect' into 'develop'
Hotfix for 'RuntimeError: no running event loop' during sendings logs to discord See merge request ekzyis/musicube!22
This commit is contained in:
commit
58c165902c
|
@ -13,7 +13,8 @@ disable=
|
|||
redefined-outer-name,
|
||||
invalid-name,
|
||||
no-self-use,
|
||||
too-many-instance-attributes
|
||||
too-many-instance-attributes,
|
||||
fixme
|
||||
|
||||
[FORMAT]
|
||||
indent-string=' '
|
||||
|
|
|
@ -62,5 +62,9 @@ class DiscordLogger(logging.Handler):
|
|||
|
||||
if self._channel is not None:
|
||||
await self._channel.send(msg)
|
||||
|
||||
asyncio.create_task(_emit_to_channel())
|
||||
try:
|
||||
asyncio.create_task(_emit_to_channel())
|
||||
except RuntimeError:
|
||||
# This is a hotfix for "RuntimeError: no running event loop" (see #22)
|
||||
# TODO investigate #22 and replace hotfix with proper fix
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue