Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Commit

Permalink
Fix comments in superseded patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasfj committed Nov 14, 2017
1 parent 7ac5621 commit 4b906b1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (w *Worker) PayloadSchema() schematypes.Schema {
))
}
// Adding supersederUrl to payload schema
// NOTE: This probably be removed when someday superseding is implemented in the queue
// NOTE: This can be removed when someday superseding is implemented in the queue
if w.options.EnableSuperseding {
payloadSchema.Properties["supersederUrl"] = schematypes.URI{
Title: "Superseder URL",
Expand Down Expand Up @@ -475,7 +475,9 @@ func (w *Worker) superseding(claim taskClaim) (taskClaim, func()) {
return claim, func() {}
}

// Take supersederUrl out of the payload
// Take supersederUrl out of the payload, as it would break the payload
// validation done in TaskRun. We attempt to hide superseding from the rest
// of the worker implementation, so that it's only creating a hack here.
supersederURL, hasSupersederURL := payload["supersederUrl"].(string)
delete(payload, "supersederUrl")
var err error
Expand Down Expand Up @@ -614,7 +616,7 @@ func (w *Worker) superseding(claim taskClaim) (taskClaim, func()) {
cancelled.Do(cancel)
}
}()
// Stop reclaiming, this cases tasks to resolve superseded
// Stop reclaiming, this causes the other tasks to resolve superseded
stopReclaiming.Do(nil)
// Wait for tasks to be resolved
tasksResolved.Wait()
Expand Down

0 comments on commit 4b906b1

Please sign in to comment.