Allow user to specify timeout per task

This commit is contained in:
Ken Hibino
2020-02-11 21:53:59 -08:00
parent 6e14062325
commit 39459b4412
4 changed files with 66 additions and 8 deletions

View File

@@ -77,6 +77,12 @@ type TaskMessage struct {
// ErrorMsg holds the error message from the last failure.
ErrorMsg string
// Timeout specifies how long a task may run.
// The string value should be compatible with time.Duration.ParseDuration.
//
// Zero means no limit.
Timeout string
}
// ProcessInfo holds information about running background worker process.