Falcon v3.0.0-b2 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 340 页 | 1.15 MB | 1 年前3
Falcon v3.0.0 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 344 页 | 1.16 MB | 1 年前3
Falcon v3.0.1 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 344 页 | 1.16 MB | 1 年前3
Falcon v3.0.0-b1 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): (continues on next page) 72 Chapter 5. Documentation Falcon Documentation0 码力 | 338 页 | 1.14 MB | 1 年前3
Falcon v3.1.1-b3 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-b1 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-a Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.0 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 362 页 | 1.29 MB | 1 年前3
Falcon v3.1.1 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-rc1 Documentationif you host your application with a threaded web server, resources and their dependencies must be thread-safe. We can use the Inspect Module to visualize the application configuration: falcon-inspect-app normal request context, you can use a thread-local context object to store the request ID: # context.py import threading class _Context: def __init__(self): self._thread_local = threading.local() @property @property def request_id(self): return getattr(self._thread_local, 'request_id', None) @request_id.setter def request_id(self, value): self._thread_local.request_id = value ctx = _Context() Then, you0 码力 | 378 页 | 1.29 MB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4













