Fixed non threadsafe code
This commit is contained in:
parent
8095f31772
commit
c2f2c16892
19 changed files with 32 additions and 20 deletions
|
|
@ -74,7 +74,15 @@ def create_backend_app(service):
|
|||
|
||||
backend = BACKENDS[service]
|
||||
for url_path, handler in backend.flask_paths.items():
|
||||
backend_app.route(url_path, methods=HTTP_METHODS)(convert_flask_to_httpretty_response(handler))
|
||||
if handler.__name__ == 'dispatch':
|
||||
endpoint = '{}.dispatch'.format(handler.__self__.__name__)
|
||||
else:
|
||||
endpoint = None
|
||||
|
||||
backend_app.route(
|
||||
url_path,
|
||||
endpoint=endpoint,
|
||||
methods=HTTP_METHODS)(convert_flask_to_httpretty_response(handler))
|
||||
|
||||
return backend_app
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue