Record deadline within WorkerInfo

This commit is contained in:
Ken Hibino
2021-01-27 15:55:43 -08:00
parent bfde0b6283
commit eba7c4e085
9 changed files with 40 additions and 30 deletions

View File

@@ -725,7 +725,8 @@ func (i *Inspector) Servers() ([]*ServerInfo, error) {
continue
}
wrkInfo := &WorkerInfo{
Started: w.Started,
Started: w.Started,
Deadline: w.Deadline,
Task: &ActiveTask{
Task: NewTask(w.Type, w.Payload),
ID: w.ID,
@@ -771,6 +772,8 @@ type WorkerInfo struct {
Task *ActiveTask
// Time the worker started processing the task.
Started time.Time
// Time the worker needs to finish processing the task by.
Deadline time.Time
}
// ClusterKeySlot returns an integer identifying the hash slot the given queue hashes to.