mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-06-26 22:00:13 +00:00

* Copy context when using threadpoolexecutor in AsyncPipeline.run_async * Add reno * Add dev comment
6 lines
447 B
YAML
6 lines
447 B
YAML
---
|
|
fixes:
|
|
- |
|
|
To properly preserve the context when AsyncPipeline with components that only have sync run methods we copy the context using contextvars.copy_context() and run the component using `ctx.run(...)` so we can preserve context like the active tracing span.
|
|
This now means if your component 1) only has a sync run method and 2) it logs something to the tracer then this trace will be properly nested within the parent context.
|