Optimize AI dashboard job payload

This commit is contained in:
Grendgi
2026-06-09 11:44:53 +03:00
parent 092994fe74
commit 6254bf0810
6 changed files with 98 additions and 2 deletions

View File

@@ -39,6 +39,27 @@ type Job struct {
IdempotencyKey *string `json:"idempotency_key,omitempty"`
}
type JobSummary struct {
ID uuid.UUID `json:"id"`
OwnerService string `json:"owner_service"`
OwnerRef string `json:"owner_ref"`
TaskType string `json:"task_type"`
ModelProfile string `json:"model_profile"`
Priority int `json:"priority"`
Status string `json:"status"`
Attempts int `json:"attempts"`
MaxAttempts int `json:"max_attempts"`
ErrorCode *string `json:"error_code,omitempty"`
ErrorMessage *string `json:"error_message,omitempty"`
ScheduledAt time.Time `json:"scheduled_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
WorkerID *string `json:"worker_id,omitempty"`
HeartbeatAt *time.Time `json:"heartbeat_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type CreateJob struct {
OwnerService string `json:"owner_service"`
OwnerRef string `json:"owner_ref"`