소스 검색

modify:doc_export函数增加request_id

zhusc 2 달 전
부모
커밋
51c71d5b62
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      main.py

+ 2 - 2
main.py

@@ -25,8 +25,8 @@ def doc_export(
         token: str = Path(title='doc token', description="文档的token")
 ):
     try:
-        # request_id = str(uuid.uuid4()) #request_id_context.get()
-        # logger.info(f"Request ID: {request_id}, Token: {token}")
+        request_id = str(uuid.uuid4()) #request_id_context.get()
+        logger.info(f"Request ID: {request_id}, Token: {token}")
         word_downloda_url = f_doc_export(token)
         if word_downloda_url:
             return BaseResponse.ofSuccess(word_downloda_url)