Change inspector's list methods to return specific task type for each

queue
This commit is contained in:
Ken Hibino
2019-12-02 07:09:43 -08:00
parent 28dae0fdd3
commit 319d157d47
4 changed files with 308 additions and 92 deletions

View File

@@ -103,17 +103,19 @@ type RetryTask struct {
ID uuid.UUID
Type string
Payload map[string]interface{}
// TODO(hibiken): add LastRetry time.Time
NextRetry time.Time
// TODO(hibiken): add LastFailedAt time.Time
ProcessAt time.Time
ErrorMsg string
Retried int
Retry int
}
// DeadTask is a task in that has exhausted all retries.
// This is read only and used for inspection purpose.
type DeadTask struct {
ID uuid.UUID
Type string
Payload map[string]interface{}
// TODO(hibiken): add LastRetry time.Time
ErrorMsg string
ID uuid.UUID
Type string
Payload map[string]interface{}
LastFailedAt time.Time
ErrorMsg string
}