resource impl

This commit is contained in:
h z
2024-12-03 00:10:47 +00:00
parent 5557b3434b
commit a93bd5d870
9 changed files with 118 additions and 6 deletions

View File

@@ -0,0 +1,12 @@
import threading
class RequestContext:
_thread_local = threading.local()
@classmethod
def set_error_id(cls, error_id):
cls._thread_local.error_id = error_id
@classmethod
def get_error_id(cls):
return getattr(cls._thread_local, "error_id", None)

0
contexts/__init__.py Normal file
View File