feat: bound news AI concurrency with immediate task refill
This commit is contained in:
1 parent
f1d060d475
commit
cbd2618a20
15 files changed
+603
-129
No files matched your search
@@ -19,3 +19,5 @@ export const startReprocessApi = (data: Risk.ReprocessRange) => request<{ id: nu
|
||||
export const listReprocessApi = () => request<Risk.ReprocessJob[]>({ url: "/risk/reprocess", method: "get" })
|
||||
export const cancelReprocessApi = (id: number) => request<null>({ url: `/risk/reprocess/${id}/cancel`, method: "post" })
|
||||
export const retryReprocessApi = (id: number) => request<null>({ url: `/risk/reprocess/${id}/retry`, method: "post" })
|
||||
|
||||
export const saveRiskConcurrencyApi = (max_concurrency: number) => request<{ max_concurrency: number }>({ url: "/risk/settings/concurrency", method: "patch", data: { max_concurrency } })
|
||||
@@ -43,6 +43,7 @@ export interface RiskEvent {
|
||||
updated_at: string
|
||||
}
|
||||
export interface Settings {
|
||||
max_concurrency: number
|
||||
enabled: boolean
|
||||
provider_id: number | null
|
||||
model: string
|
||||
@@ -79,6 +80,7 @@ export interface Briefing {
|
||||
inputs: { kind?: "package" | "event", id: number, revision: number, category: string, tags: string[], result: RiskResult & { title: string } }[]
|
||||
}
|
||||
export interface Overview {
|
||||
concurrency: { limit: number, running: number | null, queued: number, stages: Record<string, number>, updated_at: string | null }
|
||||
briefing: Briefing | null
|
||||
stage2: Record<string, number>
|
||||
stage3?: { state: string, pending: boolean, heartbeat: string | null }
|
||||
|
||||
Reference in new issue
Block a user