Skip to content

Commit

Permalink
Merge pull request #92 from OnroerendErfgoed/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
claeyswo committed Feb 21, 2022
2 parents 3b95560 + 65bc98e commit 61578f6
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
@@ -1,3 +1,9 @@
0.3.0 (21-02-2022)
------------------

- Improved performance (#8)
- Pyramid 2.0 upgrade (#85)

0.2.0 (07-12-2020)
------------------

Expand Down
22 changes: 11 additions & 11 deletions requirements-dev.txt
Expand Up @@ -2,19 +2,19 @@
--requirement requirements.txt

# Documentation
Sphinx==3.1.1
sphinxcontrib-httpdomain==1.7.0
sphinxcontrib-plantuml==0.18
Sphinx==4.3.2
sphinxcontrib-httpdomain==1.8.0
sphinxcontrib-plantuml==0.22

waitress==1.4.4
pyramid_debugtoolbar==4.6.1
waitress==2.0.0
pyramid_debugtoolbar==4.9

#testing
pytest==5.4.3
pytest-cov==2.10.0
webtest==2.0.35
httpretty==1.0.3
coveralls==2.0.0
pytest==6.2.5
pytest-cov==3.0.0
webtest==3.0.0
httpretty==1.1.4
coveralls==3.3.1

# Wheel
wheel==0.31.1
wheel==0.37.1
8 changes: 4 additions & 4 deletions requirements.txt
@@ -1,6 +1,6 @@
requests==2.25.0
pyramid==1.10.5
requests==2.27.0
pyramid==2.0

PyYAML==5.3.1
PyYAML==5.4.1

pyramid_urireferencer==0.7.0
pyramid_urireferencer==0.8.0
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -16,7 +16,7 @@
]

setup(name='uriregistry',
version='0.2.0',
version='0.3.0',
description='A central URI registry that tracks where a certain URI is being used.',
long_description=README + '\n\n' + CHANGES,
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion uriregistry/__init__.py
Expand Up @@ -49,7 +49,7 @@ def _load_configuration(path):
"""
log.debug('Loading uriregistry config from %s.' % path)
f = open(path)
content = yaml.load(f.read())
content = yaml.full_load(f.read())
log.debug(content)
f.close()
return content
Expand Down
5 changes: 4 additions & 1 deletion uriregistry/views.py
@@ -1,4 +1,5 @@
import logging
from concurrent.futures import ThreadPoolExecutor

from pyramid.httpexceptions import HTTPBadRequest
from pyramid.response import Response
Expand Down Expand Up @@ -31,7 +32,9 @@ def get_references(self):
raise HTTPBadRequest('Please include a URI parameter.')

applications = self.request.uri_registry.get_applications(uri)
application_responses = [query_application(app, uri) for app in applications]
with ThreadPoolExecutor(max_workers=len(applications)) as tpe:
futures = [tpe.submit(query_application, app, uri) for app in applications]
application_responses = [future.result(timeout=25) for future in futures]

return _get_registry_response(application_responses, uri)

Expand Down

0 comments on commit 61578f6

Please sign in to comment.