Add IsOrphaned field to TaskInfo

This commit is contained in:
Ken Hibino
2022-02-18 20:50:18 -08:00
parent 9b63e23274
commit cea5110d15
4 changed files with 66 additions and 4 deletions

View File

@@ -101,6 +101,14 @@ type TaskInfo struct {
// zero if not applicable.
NextProcessAt time.Time
// IsOrphaned describes whether the task is left in active state with no worker processing it.
// An orphaned task indicates that the worker has crashed or experienced network failures and was not able to
// extend its lease on the task.
//
// This task will be recovered by running a server against the queue the task is in.
// This field is only applicable to tasks with TaskStateActive.
IsOrphaned bool
// Retention is duration of the retention period after the task is successfully processed.
Retention time.Duration