in azure_functions_worker/dispatcher.py [0:0]
def __init__(self, coro, loop, context=None):
# The context param is only available for 3.11+. If
# not, it can't be sent in the init() call.
if sys.version_info.minor >= 11:
super().__init__(coro, loop=loop, context=context)
else:
super().__init__(coro, loop=loop)
current_task = asyncio.current_task(loop)
if current_task is not None:
invocation_id = getattr(
current_task, self.AZURE_INVOCATION_ID, None)
if invocation_id is not None:
self.set_azure_invocation_id(invocation_id)