Skip to content

Commit 552e43e

Browse files
Fix: remove dead copy_context() call in run_with
copy_context() was assigned but never used — ctx.run() does not work for async functions (it returns a coroutine without executing the body). The token-based _settings.set()/_settings.reset(tok) pattern is already re-entrant safe, and asyncio Task-per-request isolation covers the ASGI deployment. No behavioral change. Closes #91 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 241c660 commit 552e43e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/dremioai/config/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from functools import reduce
4949
from operator import ior
5050
from shutil import which
51-
from contextvars import ContextVar, copy_context
51+
from contextvars import ContextVar
5252
from os import environ
5353
from importlib.util import find_spec
5454
from datetime import datetime
@@ -578,7 +578,6 @@ async def _call():
578578
finally:
579579
_settings.reset(tok)
580580

581-
ctx = copy_context()
582581
return await _call()
583582

584583

0 commit comments

Comments
 (0)