try:
loop = asyncio.get_running_loop()
except RuntimeError:
# 'RuntimeError: There is no current event loop...'
coniql_logger.error("No running event loop...", stack_info=True)
loop = None
And we try to continue if there is no loop. However, all later code checks for whether loop is non-None, and so there's no actual work done if we hit this error case. We should probably fail here - at the least raise an exception that will be propogated back into the GraphQL engine, or possibly even end the process as we're likely to be in a catastrophically bad state if we can't get asyncio loops.
In
subscribe_channel
incaplugin.py
is the code:And we try to continue if there is no
loop
. However, all later code checks for whetherloop
is non-None, and so there's no actual work done if we hit this error case. We should probably fail here - at the least raise an exception that will be propogated back into the GraphQL engine, or possibly even end the process as we're likely to be in a catastrophically bad state if we can't getasyncio
loops.Spotted by @MJGaughran .