feat: add system task runner (#5680)

This commit is contained in:
Calcium-Ion
2026-06-24 17:16:21 +08:00
committed by GitHub
parent acb52d0f78
commit 5377192293
39 changed files with 2575 additions and 596 deletions
+8
View File
@@ -22,6 +22,7 @@ import type {
FetchUpstreamRatiosRequest,
LogCleanupTask,
SystemOptionsResponse,
SystemTaskListResponse,
SystemTaskResponse,
UpdateOptionRequest,
UpdateOptionResponse,
@@ -75,6 +76,13 @@ export async function getSystemTask(taskId: string) {
return res.data
}
export async function listSystemTasks(limit = 20) {
const res = await api.get<SystemTaskListResponse>('/api/system-task/list', {
params: { limit },
})
return res.data
}
export async function resetModelRatios() {
const res = await api.post<UpdateOptionResponse>(
'/api/option/rest_model_ratio'
+6
View File
@@ -100,6 +100,12 @@ export type SystemTaskResponse<TTask = SystemTask | null> = {
data?: TTask
}
export type SystemTaskListResponse = {
success: boolean
message: string
data?: SystemTask[]
}
export type SiteSettings = {
'theme.frontend': string
Notice: string