mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Make an context is task-local.
This commit is contained in:
parent
115f1fe032
commit
154c12a165
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ def task_factory(loop: asyncio.BaseEventLoop, coro: typing.Coroutine):
|
||||||
del task._source_traceback[-1]
|
del task._source_traceback[-1]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
task.context = asyncio.Task.current_task().context
|
task.context = asyncio.Task.current_task().context.copy()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
task.context = {CONFIGURED: True}
|
task.context = {CONFIGURED: True}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue