File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import logging
22
3+ from app .api .permissions import Permission , require_permission
34from fastapi import APIRouter , Depends
45from sqlmodel import Session
56
6- from app .api .deps import get_current_active_superuser , get_db
7+ from app .api .deps import SessionDep , AuthContextDep
78from app .crud .evaluations import process_all_pending_evaluations_sync
9+ from app .models import User
810
911logger = logging .getLogger (__name__ )
1012
1315
1416@router .get (
1517 "/cron/evaluations" ,
16- include_in_schema = True ,
17- dependencies = [Depends (get_current_active_superuser )],
18+ include_in_schema = False ,
19+ dependencies = [Depends (require_permission ( Permission . SUPERUSER ) )],
1820)
1921def evaluation_cron_job (
20- session : Session = Depends ( get_db ) ,
22+ session : SessionDep ,
2123) -> dict :
2224 """
2325 Cron job endpoint for periodic evaluation tasks.
Original file line number Diff line number Diff line change 66from sqlmodel import Session , select
77
88from app .core .util import now
9- from app .crud .credentials import get_provider_credential
109from app .models import EvaluationRun , UserProjectOrg
1110from app .models .evaluation import DatasetUploadResponse
1211from app .utils import get_langfuse_client
Original file line number Diff line number Diff line change 2525 download_batch_results ,
2626 upload_batch_results_to_object_store ,
2727)
28- from app .crud .credentials import get_provider_credential
2928from app .crud .evaluations .batch import fetch_dataset_items
3029from app .crud .evaluations .core import update_evaluation_run
3130from app .crud .evaluations .embeddings import (
You can’t perform that action at this time.
0 commit comments