Skip to content

Commit 2b38293

Browse files
committed
cleanup cron
1 parent 9755403 commit 2b38293

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

backend/app/api/routes/cron.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import logging
22

3+
from app.api.permissions import Permission, require_permission
34
from fastapi import APIRouter, Depends
45
from sqlmodel import Session
56

6-
from app.api.deps import get_current_active_superuser, get_db
7+
from app.api.deps import SessionDep, AuthContextDep
78
from app.crud.evaluations import process_all_pending_evaluations_sync
9+
from app.models import User
810

911
logger = logging.getLogger(__name__)
1012

@@ -13,11 +15,11 @@
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
)
1921
def evaluation_cron_job(
20-
session: Session = Depends(get_db),
22+
session: SessionDep,
2123
) -> dict:
2224
"""
2325
Cron job endpoint for periodic evaluation tasks.

backend/app/crud/evaluations/core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from sqlmodel import Session, select
77

88
from app.core.util import now
9-
from app.crud.credentials import get_provider_credential
109
from app.models import EvaluationRun, UserProjectOrg
1110
from app.models.evaluation import DatasetUploadResponse
1211
from app.utils import get_langfuse_client

backend/app/crud/evaluations/processing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
download_batch_results,
2626
upload_batch_results_to_object_store,
2727
)
28-
from app.crud.credentials import get_provider_credential
2928
from app.crud.evaluations.batch import fetch_dataset_items
3029
from app.crud.evaluations.core import update_evaluation_run
3130
from app.crud.evaluations.embeddings import (

0 commit comments

Comments
 (0)