Skip to content

Commit

Permalink
fixed the feedback_email killing the backend if not configured correc…
Browse files Browse the repository at this point in the history
…tly via passing Fatal log messages
  • Loading branch information
CommanderStorm committed Oct 16, 2023
1 parent 2d4c8c7 commit 57774cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/backend/cron/feedback_email.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ func (c *CronService) feedbackEmailCron() error {

var results []model.Feedback
if err := c.db.Find(&results, "processed = false").Scan(&results).Error; err != nil {
log.WithError(err).Fatal("could not get unprocessed feedback")
log.WithError(err).Error("could not get unprocessed feedback")
return err
}
parsedHtmlBody, parsedTxtBody, err := parseTemplates()
if err != nil {
log.WithError(err).Fatal("could not parse email templates")
log.WithError(err).Error("could not parse email templates")
return err
}

Expand Down Expand Up @@ -138,7 +138,7 @@ func (c *CronService) feedbackEmailCron() error {
func setupSMTPDialer() (*gomail.Dialer, error) {
smtpPort, err := strconv.Atoi(os.Getenv("SMTP_PORT"))
if err != nil {
log.WithError(err).Fatal("SMTP_PORT is not an integer")
log.WithError(err).Error("SMTP_PORT is not an integer")
return nil, err
}
d := gomail.NewDialer(os.Getenv("SMTP_URL"), smtpPort, os.Getenv("SMTP_USERNAME"), os.Getenv("SMTP_PASSWORD"))
Expand Down

0 comments on commit 57774cd

Please sign in to comment.