Skip to content

Commit

Permalink
fix (hooks): delete taskExecutions if can't be executed (#2791)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored May 30, 2018
1 parent 8109f0d commit 05f66bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions engine/hooks/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (s *Service) retryTaskExecutionsRoutine(c context.Context) error {
// the branch was deleted from git repository, it will never work
if strings.Contains(e.LastError, "branchName parameter must be provided") {
log.Warning("Hooks> retryTaskExecutionsRoutine > Do not re-enqueue this taskExecution with lastError %s %d/%d type:%s status:%s len:%d err:%s", e.UUID, e.NbErrors, s.Cfg.RetryError, e.Type, e.Status, len(e.LastError), e.LastError)
s.Dao.DeleteTaskExecution(&e)
continue
}
log.Warning("Hooks> retryTaskExecutionsRoutine > Enqueing with lastError %s %d/%d type:%s status:%s len:%d err:%s", e.UUID, e.NbErrors, s.Cfg.RetryError, e.Type, e.Status, len(e.LastError), e.LastError)
Expand Down

0 comments on commit 05f66bf

Please sign in to comment.