Ali2206 commited on
Commit
4878407
·
verified ·
1 Parent(s): 9348c80

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +10 -8
config.py CHANGED
@@ -117,11 +117,13 @@ def decode_access_token(token: str):
117
  def setup_app(app: FastAPI):
118
  @app.on_event("startup")
119
  async def startup_event():
120
- asyncio.create_task(analyze_all_patients())
121
-
122
- async def analyze_all_patients():
123
- from analysis import analyze_patient
124
- patients = await patients_collection.find({}).to_list(length=None)
125
- for patient in patients:
126
- await analyze_patient(patient)
127
- await asyncio.sleep(0.1)
 
 
 
117
  def setup_app(app: FastAPI):
118
  @app.on_event("startup")
119
  async def startup_event():
120
+ # Temporarily disable the analyze_all_patients task due to missing analyze_patient function
121
+ # asyncio.create_task(analyze_all_patients())
122
+ logger.info("Startup event triggered, analyze_all_patients task disabled until implementation.")
123
+
124
+ # async def analyze_all_patients():
125
+ # from analysis import analyze_patient
126
+ # patients = await patients_collection.find({}).to_list(length=None)
127
+ # for patient in patients:
128
+ # await analyze_patient(patient)
129
+ # await asyncio.sleep(0.1)