BIST Predictor Dev commited on
Commit
75bf2c0
Β·
1 Parent(s): 093e70b

Add force_predict API endpoint for remote triggers

Browse files
Files changed (1) hide show
  1. backend/main.py +10 -0
backend/main.py CHANGED
@@ -406,6 +406,16 @@ async def trigger_comparison(background_tasks: BackgroundTasks):
406
 
407
  # ─── Sistem API ───────────────────────────────────────────────────────────────────
408
 
 
 
 
 
 
 
 
 
 
 
409
  @app.get("/api/system/status")
410
  async def system_status():
411
  """Sistem durumu."""
 
406
 
407
  # ─── Sistem API ───────────────────────────────────────────────────────────────────
408
 
409
+ @app.post("/api/admin/force_predict")
410
+ async def force_predict(background_tasks: BackgroundTasks):
411
+ """Manuel tΓΌm tahminleri tetikle."""
412
+ def run_pred():
413
+ job_daily_prediction()
414
+
415
+ background_tasks.add_task(run_pred)
416
+ return {"message": "Tüm hisseler için tahmin süreci arka planda başlatıldı."}
417
+
418
+
419
  @app.get("/api/system/status")
420
  async def system_status():
421
  """Sistem durumu."""