Update config.py
Browse files
config.py
CHANGED
@@ -108,4 +108,9 @@ def setup_app(app: FastAPI):
|
|
108 |
async def startup_event():
|
109 |
asyncio.create_task(analyze_all_patients())
|
110 |
|
111 |
-
async def analyze_all_patients():
|
|
|
|
|
|
|
|
|
|
|
|
108 |
async def startup_event():
|
109 |
asyncio.create_task(analyze_all_patients())
|
110 |
|
111 |
+
async def analyze_all_patients():
|
112 |
+
from analysis import analyze_patient
|
113 |
+
patients = await patients_collection.find({}).to_list(length=None)
|
114 |
+
for patient in patients:
|
115 |
+
await analyze_patient(patient)
|
116 |
+
await asyncio.sleep(0.1)
|