Browse Source

Merge branch 'master' of http://git.choozmo.com:3000/choozmo/HHH_Home_Decoration_2 into master

jeter20131220 3 years ago
parent
commit
fd361d77b3
2 changed files with 4 additions and 2 deletions
  1. BIN
      api/__pycache__/main.cpython-39.pyc
  2. 4 2
      api/main.py

BIN
api/__pycache__/main.cpython-39.pyc


+ 4 - 2
api/main.py

@@ -14,7 +14,7 @@ import gspread
 import asyncio
 app = FastAPI()
 import nest_asyncio
-nest_asyncio.apply()
+import threading
 
 origins = [
     "https://hhh.com.tw"
@@ -135,7 +135,9 @@ async def create_req_detail(req:deco_request_detail):
         ,'h_class':req.h_class,'type':req.type,'budget':req.budget,'size':req.size,'bed_num':req.bed_num
         ,'liv_num':req.liv_num,'bath_num':req.bath_num,'style':req.style,'prefer_date':req.prefer_date,'time_stamp':req.time_stamp,'gender':req.gender})
         req.id = pk
-        asyncio.run(make_req_df())
+        x = threading.Thread(target=make_req_df)
+        x.start()
+        #asyncio.run(make_req_df())23
         return return_code
     else :
         return return_code