定时任务
This commit is contained in:
@@ -4,7 +4,7 @@ from ..schemas.task import (
|
||||
JobResponse, AddCronJobRequest, AddIntervalJobRequest,
|
||||
AddDateJobRequest, TaskResponse
|
||||
)
|
||||
from ..utils.scheduler import task_scheduler, example_task, database_cleanup_task
|
||||
from ..utils.scheduler import task_scheduler, example_task, database_cleanup_task, reset_today_updated_task
|
||||
|
||||
router = APIRouter(prefix="/tasks", tags=["定时任务管理"])
|
||||
|
||||
@@ -12,6 +12,7 @@ router = APIRouter(prefix="/tasks", tags=["定时任务管理"])
|
||||
AVAILABLE_FUNCTIONS = {
|
||||
"example_task": example_task,
|
||||
"database_cleanup_task": database_cleanup_task,
|
||||
"reset_today_updated_task": reset_today_updated_task,
|
||||
}
|
||||
|
||||
@router.post("/cron", response_model=TaskResponse)
|
||||
|
||||
Reference in New Issue
Block a user