Skip to content

Commit

Permalink
Merge pull request #646 from thom-at-redhat/THEEDGE-1634
Browse files Browse the repository at this point in the history
THEEDGE-1634 Change updates.go fatals to errors
  • Loading branch information
mergify[bot] authored Feb 9, 2022
2 parents 2818833 + 6f7c923 commit 4db32ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/services/updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (s *UpdateService) CreateUpdate(id uint) (*models.UpdateTransaction, error)
WaitGroup.Done() // Done with one update (successfully or not)
s.log.Debug("Done with one update - successfully or not")
if err := recover(); err != nil {
s.log.WithField("error", err).Fatal("Error on update")
s.log.WithField("error", err).Error("Error on update")
}
}()
go func(update *models.UpdateTransaction) {
Expand All @@ -124,7 +124,7 @@ func (s *UpdateService) CreateUpdate(id uint) (*models.UpdateTransaction, error)
update.Status = models.UpdateStatusError
tx := db.DB.Save(update)
if tx.Error != nil {
s.log.WithField("error", tx.Error.Error()).Fatal("Error saving update")
s.log.WithField("error", tx.Error.Error()).Error("Error saving update")
}
WaitGroup.Done()
}
Expand Down Expand Up @@ -340,7 +340,7 @@ func (s *UpdateService) ProcessPlaybookDispatcherRunEvent(message []byte) error
dispatchRecord.Status = models.DispatchRecordStatusRunning
} else {
dispatchRecord.Status = models.DispatchRecordStatusError
s.log.Fatal("Playbook status is not on the json schema for this event")
s.log.Error("Playbook status is not on the json schema for this event")
}
result = db.DB.Save(&dispatchRecord)
if result.Error != nil {
Expand Down

0 comments on commit 4db32ff

Please sign in to comment.