[Question] Had some queries around the context propagation example
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Dokumentation
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- documentation
Rechercherichtung
Beginnen Sie mit context_propagation/README.md und prüfen Sie das verlinkte Temporal Python SDK issue #263. Ermitteln Sie, ob ContextVar.reset() das Verhalten von Aktivitäten im Thread-Pool und nebenläufigen Workflows verändert, und dokumentieren Sie die unterstützten Empfehlungen sowie alle Bedingungen, unter denen das Zurücksetzen relevant ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi, was just implementing a context propagation interceptor based on this sample: https://github.com/temporalio/samples-python/blob/main/context_propagation/README.md
After a bit of experimentation, it seems like the the contextvar value is automatically restored to the previous value during multiple concurrent workflow runs and even after an activity finishes executing (if the var was updated inside the activity).
I was wondering if the ContextVar.reset() usage in the sample is redundant? or are there scenarios where it might have an effect?
I'm using a thread pool executor for my worker, so perhaps thats why it seems like ContextVar.reset() does not do anything? https://github.com/temporalio/sdk-python/issues/263
Would it be safe to remove the resetting part when using a thread pool executor for activity tasks? And for workflows in general if I don't want the context vars state to leak between them?
- Vorherrschende Sprache
- Python
- Sterne
- 367
- Forks
- 121
- Ø Merge
- 3 T. 20 Std.
- Gemergte PRs (30 T.)
- 11
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus temporalio/samples-python
-
enhancement
temporalio/samples-python#254 · 1 Kommentar · 1 zugewiesene Person ·
-
enhancement
temporalio/samples-python#253 · 1 zugewiesene Person ·
-
enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
temporalio/samples-python#231 · 1 Kommentar ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
temporalio/samples-python#192 · 2 Kommentare ·
-
enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
temporalio/samples-python#191 ·
Alle Issues in temporalio/samples-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100