Add AI job management endpoints
All checks were successful
CI / test (push) Successful in 13s
Build and Deploy / build-and-deploy (push) Successful in 24s

This commit is contained in:
Grendgi
2026-06-08 13:57:28 +03:00
parent 59e1073d96
commit 7452b1d5f2
4 changed files with 301 additions and 0 deletions

View File

@@ -67,6 +67,21 @@ type FailJob struct {
ErrorMessage string `json:"error_message"`
}
type JobFilter struct {
OwnerService string `json:"owner_service,omitempty"`
OwnerRef string `json:"owner_ref,omitempty"`
TaskType string `json:"task_type,omitempty"`
ModelProfile string `json:"model_profile,omitempty"`
Statuses []string `json:"statuses,omitempty"`
ErrorCodes []string `json:"error_codes,omitempty"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
}
type BatchActionResult struct {
Updated int `json:"updated"`
}
type QueueStat struct {
TaskType string `json:"task_type"`
ModelProfile string `json:"model_profile"`
@@ -82,8 +97,17 @@ type ErrorStat struct {
Last24h int64 `json:"last_24h"`
}
type OwnerStat struct {
OwnerService string `json:"owner_service"`
TaskType string `json:"task_type"`
ModelProfile string `json:"model_profile"`
Status string `json:"status"`
Total int64 `json:"total"`
}
type Stats struct {
At time.Time `json:"at"`
Queues []QueueStat `json:"queues"`
Owners []OwnerStat `json:"owners,omitempty"`
Errors []ErrorStat `json:"errors,omitempty"`
}