Spaces:
Sleeping
Sleeping
andykr1k commited on
Commit ·
717f4a5
1
Parent(s): af79f6c
added scheduler, logging and optimization updates
Browse files- app.py +2 -2
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -19,6 +19,7 @@ from apscheduler.schedulers.background import BackgroundScheduler
|
|
| 19 |
from apscheduler.triggers.cron import CronTrigger
|
| 20 |
import logging
|
| 21 |
import uvicorn
|
|
|
|
| 22 |
|
| 23 |
# Configure logging
|
| 24 |
logging.basicConfig(level=logging.INFO)
|
|
@@ -244,8 +245,7 @@ async def get_recommendations_handler(user_id: str = Query(...)):
|
|
| 244 |
async def health_check():
|
| 245 |
return {"status": "success", "message": "Service operational"}
|
| 246 |
|
| 247 |
-
scheduler = BackgroundScheduler(timezone="
|
| 248 |
-
|
| 249 |
scheduler.add_job(
|
| 250 |
rebuild_model,
|
| 251 |
trigger=CronTrigger(hour=3, minute=30),
|
|
|
|
| 19 |
from apscheduler.triggers.cron import CronTrigger
|
| 20 |
import logging
|
| 21 |
import uvicorn
|
| 22 |
+
import pytz
|
| 23 |
|
| 24 |
# Configure logging
|
| 25 |
logging.basicConfig(level=logging.INFO)
|
|
|
|
| 245 |
async def health_check():
|
| 246 |
return {"status": "success", "message": "Service operational"}
|
| 247 |
|
| 248 |
+
scheduler = BackgroundScheduler(timezone="America/Los_Angeles")
|
|
|
|
| 249 |
scheduler.add_job(
|
| 250 |
rebuild_model,
|
| 251 |
trigger=CronTrigger(hour=3, minute=30),
|
requirements.txt
CHANGED
|
@@ -7,4 +7,5 @@ supabase
|
|
| 7 |
fastapi
|
| 8 |
python-dotenv
|
| 9 |
uvicorn
|
| 10 |
-
apscheduler
|
|
|
|
|
|
| 7 |
fastapi
|
| 8 |
python-dotenv
|
| 9 |
uvicorn
|
| 10 |
+
apscheduler
|
| 11 |
+
pytz
|