Optimize AI dashboard job payload
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user