feat(delivery): switch AWX delivery to callbacks

This commit is contained in:
mac
2026-07-27 15:19:18 +08:00
parent 97f0de16bc
commit e0ee36cadb
9 changed files with 594 additions and 104 deletions
+9 -6
View File
@@ -32,6 +32,7 @@ type DeliveryTask struct {
ID string `gorm:"size:36;primaryKey" json:"id"`
BusinessLineID uint64 `gorm:"not null;index" json:"business_line_id"`
RequestedBy uint64 `gorm:"not null;index" json:"requested_by"`
Component string `gorm:"size:32;not null;default:mysql;index" json:"component"`
TargetType string `gorm:"size:32;not null" json:"target_type"`
TargetID uint64 `gorm:"not null;index" json:"target_id"`
Namespace string `gorm:"size:63;not null;index" json:"namespace"`
@@ -111,10 +112,12 @@ type ExecutionJob struct {
}
type TaskEvent struct {
ID uint64 `gorm:"primaryKey" json:"id"`
TaskID string `gorm:"size:36;not null;index" json:"task_id"`
FromState string `gorm:"size:32;not null" json:"from_state"`
ToState string `gorm:"size:32;not null" json:"to_state"`
Message string `gorm:"type:text" json:"message"`
CreatedAt time.Time `gorm:"index" json:"created_at"`
ID uint64 `gorm:"primaryKey" json:"id"`
TaskID string `gorm:"size:36;not null;index" json:"task_id"`
FromState string `gorm:"size:32;not null" json:"from_state"`
ToState string `gorm:"size:32;not null" json:"to_state"`
Stage string `gorm:"size:32;index" json:"stage,omitempty"`
EventStatus string `gorm:"size:32;index" json:"event_status,omitempty"`
Message string `gorm:"type:text" json:"message"`
CreatedAt time.Time `gorm:"index" json:"created_at"`
}