Spaces:
Runtime error
Runtime error
Update config.py
Browse files
config.py
CHANGED
|
@@ -36,16 +36,16 @@ users_collection = db["users"]
|
|
| 36 |
patients_collection = db["patients"]
|
| 37 |
analysis_collection = db["patient_analysis_results"]
|
| 38 |
alerts_collection = db["clinical_alerts"]
|
|
|
|
| 39 |
logger.info("📡 Connected to MongoDB synchronously")
|
| 40 |
|
| 41 |
-
# JWT settings
|
| 42 |
SECRET_KEY = os.getenv("SECRET_KEY", "your-secret-key")
|
| 43 |
ALGORITHM = "HS256"
|
| 44 |
|
| 45 |
def setup_app(app: FastAPI):
|
| 46 |
@app.on_event("startup")
|
| 47 |
async def startup_event():
|
| 48 |
-
# Run async analysis task
|
| 49 |
asyncio.create_task(analyze_all_patients())
|
| 50 |
|
| 51 |
async def analyze_all_patients():
|
|
|
|
| 36 |
patients_collection = db["patients"]
|
| 37 |
analysis_collection = db["patient_analysis_results"]
|
| 38 |
alerts_collection = db["clinical_alerts"]
|
| 39 |
+
notifications_collection = db["notifications"] # New collection for notifications
|
| 40 |
logger.info("📡 Connected to MongoDB synchronously")
|
| 41 |
|
| 42 |
+
# JWT settings
|
| 43 |
SECRET_KEY = os.getenv("SECRET_KEY", "your-secret-key")
|
| 44 |
ALGORITHM = "HS256"
|
| 45 |
|
| 46 |
def setup_app(app: FastAPI):
|
| 47 |
@app.on_event("startup")
|
| 48 |
async def startup_event():
|
|
|
|
| 49 |
asyncio.create_task(analyze_all_patients())
|
| 50 |
|
| 51 |
async def analyze_all_patients():
|