fix issues with privileged not set

This commit is contained in:
Brad Rydzewski
2019-10-24 19:25:18 -07:00
parent a6d6ee70c1
commit 4119ac2a6d
7 changed files with 24 additions and 29 deletions

View File

@@ -76,6 +76,10 @@ func (s *Runner) Run(ctx context.Context, stage *drone.Stage) error {
stage.Machine = s.Machine
err := s.Client.Accept(ctx, stage)
if err != nil && err == client.ErrOptimisticLock {
log.Debug("stage accepted by another runner")
return nil
}
if err != nil {
log.WithError(err).Error("cannot accept stage")
return err