Persist DepStatus of tasks (#1610)

This commit is contained in:
Lukasz
2023-03-11 01:58:28 +01:00
committed by GitHub
parent f1f722645c
commit dc90f97524
3 changed files with 13 additions and 17 deletions

View File

@@ -36,7 +36,7 @@ func WithTaskStore(q Queue, s model.TaskStore) Queue {
Labels: task.Labels,
Dependencies: task.Dependencies,
RunOn: task.RunOn,
DepStatus: make(map[string]string),
DepStatus: task.DepStatus,
})
}
if err := q.PushAtOnce(context.Background(), toEnqueue); err != nil {
@@ -58,6 +58,7 @@ func (q *persistentQueue) Push(c context.Context, task *Task) error {
Labels: task.Labels,
Dependencies: task.Dependencies,
RunOn: task.RunOn,
DepStatus: task.DepStatus,
}); err != nil {
return err
}
@@ -80,6 +81,7 @@ func (q *persistentQueue) PushAtOnce(c context.Context, tasks []*Task) error {
Labels: task.Labels,
Dependencies: task.Dependencies,
RunOn: task.RunOn,
DepStatus: task.DepStatus,
}); err != nil {
return err
}