Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pump, Cedric
lab-tracing
Commits
e15117eb
Commit
e15117eb
authored
Dec 27, 2020
by
Nane Kratzke
Browse files
n=3
parent
b94caeb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
space/service.py
View file @
e15117eb
...
...
@@ -48,9 +48,9 @@ def space():
}
with
tracer
.
start_span
(
operation_name
=
"parallel"
,
child_of
=
parent_span
)
as
span
:
results
=
Parallel
()(
delayed
(
load_url
)(
key
,
url
)
for
key
,
url
in
queries
.
items
())
results
=
Parallel
(
n_jobs
=
3
)(
delayed
(
load_url
)(
key
,
url
)
for
key
,
url
in
queries
.
items
())
result
=
{
key
:
content
for
key
,
content
in
results
}
#for key, url in queries.items():
# with tracer.start_span(operation_name=key, child_of=parent_span) as span:
# result[key] = json.loads(requests.get(url).content)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment