| 37 | } |
| 38 | |
| 39 | type BaseTask struct { |
| 40 | Id string |
| 41 | Type TaskType |
| 42 | LogLabels map[string]string |
| 43 | FailureCount int // Failed executions count |
| 44 | FailureMessage string |
| 45 | QueueName string |
| 46 | QueuedAt time.Time |
| 47 | |
| 48 | Props map[string]interface{} |
| 49 | |
| 50 | lock sync.RWMutex |
| 51 | Metadata interface{} |
| 52 | |
| 53 | compactionID string |
| 54 | |
| 55 | processing atomic.Bool |
| 56 | } |
| 57 | |
| 58 | func NewTask(taskType TaskType) *BaseTask { |
| 59 | taskId := uuid.Must(uuid.NewV4()).String() |
nothing calls this directly
no outgoing calls
no test coverage detected