mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-22 12:44:30 +03:00
Nicer use of dict update methods.
This commit is contained in:
parent
46e41ee08d
commit
d859c34fb9
1 changed files with 3 additions and 8 deletions
|
@ -232,12 +232,7 @@ class PerDestinationQueue(object):
|
||||||
# If there is no span context then we are either blacklisting
|
# If there is no span context then we are either blacklisting
|
||||||
# this destination or we are not tracing
|
# this destination or we are not tracing
|
||||||
if span_context:
|
if span_context:
|
||||||
if "references" not in span_context:
|
span_context.setdefault("references", []).append(
|
||||||
span_context["references"] = [
|
|
||||||
opentracing.active_span_context_as_string()
|
|
||||||
]
|
|
||||||
else:
|
|
||||||
span_context["references"].append(
|
|
||||||
opentracing.active_span_context_as_string()
|
opentracing.active_span_context_as_string()
|
||||||
)
|
)
|
||||||
edu_dict["content"]["context"] = json.dumps(
|
edu_dict["content"]["context"] = json.dumps(
|
||||||
|
|
Loading…
Reference in a new issue