Add Deadline option when enqueuing tasks

Deadline option sets the deadline for the given task's context deadline.
This commit is contained in:
Ken Hibino
2020-03-07 20:24:03 -08:00
parent 25992c2781
commit 3c722386b0
6 changed files with 225 additions and 74 deletions

View File

@@ -90,6 +90,13 @@ type TaskMessage struct {
//
// Zero means no limit.
Timeout string
// Deadline specifies the deadline for the task.
// Task won't be processed if it exceeded its deadline.
// The string shoulbe be in RFC3339 format.
//
// time.Time's zero value means no deadline.
Deadline string
}
// ProcessState holds process level information.